UPC-E
UPC-E is a linear digital barcode designed to encode product information in retail. As you know, the UPC standard is based on EAN. Namely, the American UPC-A is an analog of the European EAN-13. The main difference is only the length of the code: 12 characters versus 13. EAN-13 has a shortened version EAN-8, created for more compact placement on small packages. Similarly, UPC-A has a "lite" version of UPC-E, consisting of 6 characters. As a rule, the product and item codes used in UPC-A contain many zeros. By removing zeros from these codes, it was possible to reduce the barcode length from 12 to 6 characters without losing information.
The structure of the code:
- the first character prefix denotes the number system 0 or 1. This determines how the code will be interpreted;
- then 6 characters of the manufacturer and product code (in UPC-A, they are separated);
- the last character is a checksum digit to verify the integrity of the code.
UPC-E can actually encode 6 to 8 characters. When encoding a minimum set of 6 characters, the first character denoting the number system, as well as the last character, the checksum digit, are excluded. When encoding 7 characters, only the checksum digit is excluded. The eight-character code includes the entire code structure described above. The shortened version of UPC lacks start and stop characters—in favor of compactness.
Depending on which number system is selected, the checksum is calculated automatically. Thus, the UPC-E standard is divided into UPC-E0 and UPC-E1. It is important to note that UPC-E can only encode GTIN-12 structures with a leading 0 and a sequence of zeros in the code. This sequence of zeros will eventually be eliminated in the UPC-E code.
As in UPC-A, each data character in UPC-E is encoded with two bars and two spaces. A bar or space can be 1, 2, 3, or 4 modules wide (one module is 0.33 mm).
To generate an UPC-E0 or UPC-E1 barcode in FastReport .NET, select the Barcode object at the Components Panel in the Report Designer. In the drop-down list, navigate to the "EAN/UPC" category, and then choose UPC-E0 or UPC-E1:
After selecting the barcode, place it on the Report Page.
Double-click on the added barcode to open the editor. You can also open the barcode editor by clicking the button in the context menu of the added object, accessed by right-clicking:
All objects of the Barcode type have a set of properties. Here are the most commonly used ones:
Property | Description |
---|---|
Angle | Allows you to set the rotation of the object to one of the fixed angles – 0, 90, 180, or 270 degrees. |
Zoom | Sets the scaling of the barcode. This property is used only with the AutoSize property. |
AutoSize | If this property is enabled, the object will be stretched to show the entire barcode. If the property is disabled, the barcode will be stretched to the size of the object. |
ShowText | Determines whether to show the text at the bottom of the barcode. |
DataColumn | The data field from which to load the text of the object. |
Expression | An expression that returns the text of the object. |
Text | The text of the object. |
Padding | Allows you to set the padding from the edges of the object in pixels. |
WideBarRatio | This property is available for all linear barcodes. It defines the relative size of the barcode's wide bars. |
CalcCheckSum | This property is available for many linear barcodes. It determines whether to calculate the checksum automatically. If this property is disabled, the checksum must be present in the object text. |
DrawVerticalBearerBars | If this property is enabled, the side lines will be displayed for the object. |
If the ShowText
property is disabled, the barcode will look like this: