The UPC-E barcode option is used in IDAutomation Barcode Fonts, Components and Applications to create a UPC-E barcode used to encode 12 digits of the GTIN.
UPC-E is actually a UPC-A barcode that is suppressed into a smaller barcode by removing certain digits, mostly zeros. Only certain numbers may be suppressed into 12 digits.
The DataToEncode is made up of a UPC-A number string of 11, 12, 13, 14, 16 or 17 digits; add-ons are supported only with 13, 14, 16 or 17 digits. Zero (UPC-E0) is the default number system encoding mode; one (UPC-E1) is supported when the first character is “1” instead of “0”. When using products and Font Encoders that are Feature Level 6 or higher, the DataToEncode may also be a UPC-E number of 6, 7 or 8 digits that comply with the expansion rules.
- Using the UPC-E barcode option with a font encoder returns text formatted to UPC-E Barcode.
- The UPC-E option in all components and applications will produce a barcode image.
- Entering incorrect data will create a barcode containing “00005000000” in some products.
Fig. 1. UPC-E barcode encoding “02345673”.
The above UPC-E barcode was created with the Barcode Image Generator. A free online barcode generator is also available. The UPC-E barcode type may be easily read and verified with the IDAutomation USB Barcode Scanner.
UPC-E Expansion Rules and Details
Consider using the full UPC-A number (11 characters without the check digit or 12 characters with the check digit) when encoding UPC-E symbols with IDAutomation’s products. The complete UPC-E number is 8 digits, although only 6 are needed to properly encode a symbol.
When encoding the UPC-E number directly with IDAutomation’s products, the following rules apply:
- When 6 digits are used, the leading digit of zero is added for UPC-E0 encoding and the last character, the check digit is not included.
- When 7 digits are used, the first digit (either 0 or 1) determines the number system encoding and the last character, the check digit is not included.
- When 8 digits are used, first digit (either 0 or 1) determines the number system encoding and the last character, the check digit, is included but ignored and recalculated to ensure accurate encoding.
Fig. 2. Six Digit UPC-E Expansion Rules Chart. The first digit of zero and the last digit, the check digit, are not included.
UPC-E Number | Insertion Digits | Expanded UPC-A Number |
# # # # # 0 | 00000 | # # 00000 # # # |
# # # # # 1 | 10000 | # # 10000 # # # |
# # # # # 2 | 20000 | # # 20000 # # # |
# # # # # 3 | 00000 | # # # 00000 # # |
# # # # # 4 | 00000 | # # # # 00000 # |
# # # # # 5 | 0000 | # # # # # 00005 |
# # # # # 6 | 0000 | # # # # # 00006 |
# # # # # 7 | 0000 | # # # # # 00007 |
# # # # # 8 | 0000 | # # # # # 00008 |
# # # # # 9 | 0000 | # # # # # 00009 |
UPC-E Suppression Rules
UPC-A numbers are suppressed into UPC-E numbers by the four rules below. Attempting to generate a UPC-E with a number that does not apply to any of the following rules, will create a UPC-A in some products or a barcode encoding only 00005000000.
Fig. 3. Conditions of UPC-E Suppression and Number Compression.
The last digit of the 12 digit UPC-A, the check digit is not needed for these conditions, however, it is included as the last digit in the printed UPC-E symbol. D is used to refer to digit locations, for example D11 means digit 11.
- Condition A (Example: 023456000073 = 02345673)
If D11 equals 5, 6, 7, 8 or 9, and D6 is not 0, and D7-D10 are all 0, then,
DataToEncode = D1 D2 D3 D4 D5 D6 D11 D12
- Condition B (Example: 023450000017 = 02345147)
If D6-D10 are 0 and D5 is not 0, then,
DataToEncode = D1 D2 D3 D4 D5 D11 “4” D12
- Condition C (Example: 063200009716 = 06397126)
If D5-D8 = 0 and D4 = 0, 1 or 2, then,
DataToEncode = D1 D2 D3 D9 D10 D11 D4 D12
- Condition D (Example: 086700000939 = 08679339)
If D5-D9 = 0 and D4 = 3-9, then,
DataToEncode = D1 D2 D3 D4 D10 D11 “3” D12
Visual Basic source code (VBA) to the suppression algorithm may be obtained by examining the UPCe7To11 function included with any purchase of the IDAutomation UPC Barcode Font.