UPC Shipping Container Symbol (ITF-14)
- 2 minutes to read
Short Description
The UPC Shipping Container Symbol (ITF-14) bar code is used to mark packaging materials that contain products labeled with a UPC or EAN product identification number.
This bar code provides a GS1 implementation of an Interleaved 2 of 5 bar code for encoding a Global Trade Item Number (an identifier for trade items developed by GS1). This bar code always uses a total of 14 digits.
The thick black border around the symbol (the Bearer Bar) is intended to improve bar code reading reliability.
Bar Code Properties
The type of a bar code control’s Symbology property is ITF14Generator.
The following properties are specific to the ITF14Generator type.
ITF14Generator.WideNarrowRatio
Gets or sets the density of bars.
BarCodeGeneratorBase.CalcCheckSum
Specifies whether or not to calculate a checksum for the bar code.
Examples
The following code creates a UPC Shipping Container Symbol (ITF-14) bar code and specifies its main properties.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-add-a-bar-code-to-a-report-e167.
using System;
using System.Collections.Generic;
using System.Drawing.Printing;
using System.Windows.Forms;
using DevExpress.XtraPrinting.BarCode;
using DevExpress.XtraReports.UI;
// ...
public XRBarCode CreateITF14BarCode(string BarCodeText) {
// Create a bar code control.
XRBarCode barCode = new XRBarCode();
// Set the barcode's type to ITF-14.
barCode.Symbology = new ITF14Generator();
// Adjust the bar code's main properties.
barCode.Text = BarCodeText;
barCode.Width = 350;
barCode.Height = 100;
// Adjust the properties specific to the bar code type.
((ITF14Generator)barCode.Symbology).CalcCheckSum = false;
((ITF14Generator)barCode.Symbology).WideNarrowRatio = 2.5f;
return barCode;
}
To add the XRBarCode to a report band, handle the report’s XRControl.BeforePrint event.