Barcode types

Zint is the library in hmReports used for barcode generation (Copyright © 2011 Robin Stuart).

Overview


One-Dimensional Symbols

One-Dimensional Symbols are what most people associate with the term barcode. They consist of a number of bars and a number of spaces of differing widths.

Code 11



Developed by Intermec in 1977, Code 11 is similar to Code 2 of 5 Matrix and is primarily used in telecommunications. The symbol can encode any length string consisting of the digits 0-9 and the dash character (-). One modulo-11 check digit is calculated.

Code 2 of 5


Code 2 of 5 is a family of one- dimensional symbols, 8 of which are supported by Zint. Note that the names given to these standards alters from one source to another so you should take care to ensure that you have the right barcode type before using these standards.

Standard Code 2 of 5


Also known as Code 2 of 5 Matrix is a self-checking code used in industrial applications and photo development. Standard Code 2 of 5 will encode any length numeric input (digits 0-9).

IATA Code 2 of 5


Used for baggage handling in the air-transport industry by the International Air Transport Agency, this self-checking code will encode any length numeric input (digits 0-9) and does not include a check digit.

Industrial Code 2 of 5


Industrial Code 2 of 5 can encode any length numeric input (digits 0-9) and does not include a check digit.

Interleaved Code 2 of 5


This self-checking symbology encodes pairs of numbers, and so can only encode an even number of digits (0-9). If an odd number of digits is entered a leading zero is added by Zint. No check digit is added.

Code 2 of 5 Data Logic


Data Logic does not include a check digit and can encode any length numeric input (digits 0-9).

ITF-14


ITF-14, also known as UPC Shipping Container Symbol or Case Code is based on Interleaved Code 2 of 5 and requires a 13 digit numeric input (digits 0-9). One modulo-10 check digit is calculated.

Deutsche Post Leitcode


Leitcode is based on Interleaved Code 2 of 5 and is used by Deutsche Post for mailing purposes. Leitcode requires a 13-digit numerical input and includes a check digit.

Deutsche Post Identcode


Identcode is based on Interleaved Code 2 of 5 and is used by Deutsche Post for mailing purposes. Identcode requires an 11-digit numerical input and includes a check digit.

Universal Product Code (EN 797)



UPC Version A


UPC-A is used in the United States for retail applications. The symbol requires an 11 digit article number. The check digit is calculated by Zint. In addition EAN-2 and EAN-5 add-on symbols can be added using the + character.

UPC Version E


UPC-E is a zero-compressed version of UPC-A developed for smaller packages. The code requires a 6 digit article number (digits 0-9). The check digit is calculated by Zint. EAN-2 and EAN-5 add- on symbols can be added using the + character as with UPC-A. In addition Zint also supports Number System 1 encoding by entering a 7-digit article number stating with the digit 1.

European Article Number (EN 797)



EAN-2, EAN-5, EAN-8 and EAN-13


The EAN system is used in retail across Europe and includes standards for EAN-2 and EAN-5 add-on codes, EAN-8 and EAN-13 which encode 2, 5, 7 or 12 digit numbers respectively. Zint will decide which symbology to use depending on the length of the input data. In addition EAN-2 and EAN-5 add-on symbols can be added using the + symbol as with UPC symbols.

All of the EAN symbols include check data which is added by Zint.

SBN, ISBN and ISBN-13


EAN-13 symbols (also known as Bookland EAN-13) can also be produced from 9-digit SBN, 10- digit ISBN or 13-digit ISBN-13 data. The relevant check digit needs to be present in the input data and will be verified before the symbol is generated. In addition EAN-2 and EAN-5 add-on symbols can be added using the + symbol as with UPC symbols.

Plessey



Also known as Plessey Code, this symbology was developed by the Plessey Company Ltd. in the UK. The symbol can encode any length data consisting of digits (0-9) or letters A- F and includes a CRC check digit.

MSI Plessey


Based on Plessey and developed by MSE Data Corporation, MSI Plessey is available with a range of check digit options available by setting hmRep_oprop_Barcode_Option2. Any length numeric (digits 0-9) input can be encoded. The table below shows the options available:



Telepen



Telepen Alpha


Telepen Alpha was developed by SB Electronic Systems Limited and can encode any length of ASCII text input. Telepen includes a modulo-127 check digit.

Telepen Numeric


Telepen Numeric allows compression of numeric data into a Telepen symbol. Data can consist of pairs of numbers or pairs consisting of a numerical digit followed an X character. For example: 466333 and 466X33 are valid codes whereas 46X333 is not (the digit pair "X3" is not valid). Includes a modulo-127 check digit.

Code 39



Standard Code 39 (ISO 16388)


Standard Code 39 was developed in 1974 by Intermec. Input data can be of any length and supports the characters 0-9, A- Z, dash (-), full stop (.), space, asterisk (*), dollar ($), slash (/), plus (+) and percent (%). The standard does not require a check digit but a modulo-43 check digit can be added if required by setting hmRep_oprop_Barcode_Option2 = 1.

Extended Code 39


Also known as Code 39e and Code39+, this symbology expands on Standard Code 39 to provide support to the full ASCII character set. The standard does not require a check digit but a modulo-43 check digit can be added if required by setting hmRep_oprop_Barcode_Option2 = 1.

Code 93


A variation of Extended Code 39, Code 93 also supports full ASCII text. Two check digits are added by Zint.

PZN


PZN is a Code 39 based symbology used by the pharmaceutical industry in Germany. PZN encodes a 6 digit number and includes a modulo-10 check digit.

LOGMARS


LOGMARS (Logistics Applications of Automated Marking and Reading Symbols) is a variation of the Code 39 symbology used by the US Department of Defence. LOGMARS encodes the same character set as Standard Code 39 and adds a modulo-43 check digit.

Code 32


A variation of Code 39 used by the Italian Ministry of Health ("Ministero della Sanità") for encoding identifiers on pharmaceutical products. Requires a numeric input up to 8 digits in length. Check digit is added by Zint.

HIBC Code 39


This option adds a leading '+' character and a trailing modulo-49 check digit to a standard Code 39 symbol as required by the Health Industry Barcode standards.

Codabar (EN 798)



Also known as NW-7, Monarch, ABC Codabar, USD-4, Ames Code and Code 27, this symbology was developed in 1972 by Monarch Marketing Systems for retail purposes. The American Blood Commission adopted Codabar in 1977 as the standard symbology for blood identification. Codabar can encode any length string starting and ending with the letters A-D and containing between these letters the numbers 0-9, dash (-), dollar ($), colon (:), slash (/), full stop (.) or plus (+). No check digit is generated.

Pharmacode



Developed by Laetus, Pharmacode is used for the identification of pharmaceuticals. The symbology is able to encode whole numbers between 3 and 131070.

Code 128



Standard Code 128 (ISO 15417)


One of the most ubiquitous one-dimensional barcode symbologies, Code 128 was developed in 1981 by Computer Identics. This symbology supports full ASCII text and uses a three-mode system to compress the data into a smaller symbol. Zint automatically switches between modes and adds a modulo-103 check digit. Code 128 is the default barcode symbology used by Zint. In addition Zint supports the encoding of Latin-1 (non-English) characters in Code 128 symbols [1].

Code 128 Subset B


It is sometimes advantageous to stop Code 128 from using subset mode C which compresses numerical data. This suppresses mode C in favour of mode B.

GS1-128


A variation of Code 128 also known as UCC/EAN-128, this symbology is defined by the GS1 General Specification. Application Identifiers (AIs) should be entered using [square brackets] notation. These will be converted to (round brackets) for the human readable text. This will allow round brackets to be used in the data strings to be encoded. Fixed length data should be entered at the appropriate length for correct encoding (see Appendix C). GS1-128 does not support extended ASCII characters. Check digits for GTIN data (AI 01) are not generated and need to be included in input data. The following is an example of a valid GS1-128 input: [01]98898765432106[3202]012345[15]991231"

EAN-14


A shorter version of GS1-128 which encodes GTIN data only. A 13 digit number is required. GTIN check digit and AI (01) are added by Zint.

NVE-18


A variation of Code 128 the Nummber der Versandeinheit standard includes both modulo-10 and modulo-103 check digits. NVE-18 requires a 17 digit numerical input.

HIBC Code 128


This option adds a leading '+' character and a trailing modulo-49 check digit to a standard Code 128 symbol as required by the Health Industry Barcode standards.

GS1 DataBar (ISO 24724)



Also known as RSS (Reduced Spaced Symbology) these symbols are due to replace GS1-128 symbols starting in 2010 in accordance with the GS1 General Specification. If a GS1 DataBar symbol is to be printed with a 2D component as specified in ISO 24723 set hmRep_oprop_Barcode_Option1 = 2.

DataBar-14 and DataBar-14 Truncated


Also known as RSS-14 this standard encodes a 13 digit item code. A check digit and application identifier of (01) are added by Zint. Note that for full standard compliance symbol height should be greater than or equal to 33 modules. For DataBar-14 Truncated set the symbol height to a minimum of 13.

DataBar Limited


Also known as RSS Limited this standard encodes a 13 digit item code and can be used in the same way as DataBar-14 above. DataBar Limited, however, is limited to data starting with digits 0 and 1 (i.e. numbers in the range 0 to 1999999999999). As with DataBar-14 a check digit and application identifier of (01) are added by Zint.

DataBar Expanded


Also known as RSS Expanded this is a variable length symbology capable of encoding data from a number of AIs in a single symbol. AIs should be encased in [square brackets] in the input data. This will be converted to (rounded brackets) before it is included in the human readable text attached to the symbol. This method allows the inclusion of rounded brackets in the data to be encoded. GTIN data (AI 01) should also include the check digit data as this is not calculated by Zint when this symbology is encoded. Fixed length data should be entered at the appropriate length for correct encoding (see Appendix C). The following is an example of a valid DataBar Expanded input "[01]98898765432106[3202]012345[15]991231"

Korea Post Barcode



The Korean Postal Barcode is used to encode a six-digit number and includes one check digit.

Channel Code



A highly compressed symbol for numeric data. The number of channels in the symbol can be between 3 and 8 and this can be specified by setting the value of hmRep_oprop_Barcode_Option2. It can also be determined by the length of the input data e.g. a three character input string generates a 4 channel code by default. The maximum values permitted depend on the number of channels used as shown in the table below:



Note that 7 and 8 channel codes require a processor intensive algorithm to generate and so response times when generating these codes will be relatively slow.

Two-Dimensional Symbols

Data Matrix (ISO 16022)



Also known as Semacode this symbology was developed in 1989 by Acuity CiMatrix in partnership with the US DoD and NASA. The symbol can encode a large amount of data in a small area. Data Matrix can encode any characters in the Latin-1 set and can also encode GS1 data. The size of the generated symbol can also be adjusted by setting hmRep_oprop_Barcode_Option2 as shown in the table below. A separate symbology ID can be used to encode Health Industry Barcode (HIBC) data which adds a leading '+' character and a modulo-49 check digit to the encoded data. Note that only ECC200 encoding is supported, the older standards have now been removed from hmReports.



QR Code (ISO 18004)



Also known as Quick Response Code this symbology was developed by Denso. Four levels of error correction are available using hmRep_oprop_Barcode_Option1 as shown in the following table.



The size of the symbol can be set by hmRep_oprop_Barcode_Option2 to the QR Code version required (1-40). The size of symbol generated is shown in the table below.



The maximum capacity of a (version 40) QR Code symbol is 7089 numeric digits, 4296 alphanumeric characters or 2953 bytes of data. QR Code symbols can also be used to encode GS1 data. QR Code symbols can encode characters in the Latin-1 set and Kanji characters which are members of the Shift-JIS encoding scheme. Input should be entered as a UTF-8 stream with conversion to Shift-JIS being carried out automatically by hmReports. A separate symbology ID can be used to encode Health Industry Barcode (HIBC) data which adds a leading '+' character and a modulo-49 check digit to the encoded data.

Aztec Code (ISO 24778)



Invented by Andrew Longacre at Welch Allyn Inc in 1995 the Aztec Code symbol is a matrix symbol with a distinctive bulls-eye finder pattern. Zint can generate Compact Aztec Code (sometimes called Small Aztec Code) as well as "full-range" Aztec Code symbols and by default will automatically select symbol type and size dependent on the length of the data to be encoded. Error correction codewords will normally be generated to fill at least 23% of the symbol. Two options are available to change this behaviour:

The size of the symbol can be specified using the setting hmRep_oprop_Barcode_Option2 to a value between 1 and 36 according to the following table. The symbols marked with an asterisk (*) in the table below are "compact" symbols, meaning they have a smaller bulls-eye pattern at the centre of the symbol.


Note that in symbols which have a specified size the amount of error correction is dependent on the length of the data input and Zint will allow error correction capacities as low as 3 codewords. Alternatively the amount of error correction data can be specified by use of the setting hmRep_oprop_Barcode_Option1 to a value from the following table:



It is not possible to select both symbol size and error correction capacity for the same symbol. If both options are selected then the error correction capacity selection will be ignored. Aztec Code is able to encode any extended ASCII character data up to a maximum length of approximately 3823 numeric or 3067 alphabetic characters or 1914 bytes of data. A separate symbology ID can be used to encode Health Industry Barcode (HIBC) data which adds a leading '+' character and a modulo-49 check digit to the encoded data.

Aztec Runes



A truncated version of compact Aztec Code for encoding whole integers between 0 and 255. Includes Reed-Solomon error correction. As defined in ISO/IEC 24778 Annex A.

Micro QR Code (ISO 18004)



A miniature version of the QR Code symbol for short messages. ECC levels can be selected as for QR Code (above). QR Code symbols can encode characters in the Latin- 1 set and Kanji characters which are members of the Shift-JIS encoding scheme. Input should be entered as a UTF-8 stream with conversion to Shift-JIS beingcarried out automatically by hmReports. A preferred symbol size can be selected by setting hmRep_oprop_Barcode_Option2 although the actual version used by hmReports may be different if required by the input data. The table below shows the possible sizes:



Code One



A matrix symbology developed by Ted Williams in 1992 which encodes data in a way similar to Data Matrix. Code One is able to encode the Latin-1 character set or GS1 data. There are two types of Code One symbol - variable height symbols which are roughly square (versions A thought to H) and fixed-height versions (version S and T). These can be selected by using the setting hmRep_oprop_Barcode_Option2 as shown in the table below:



Grid Matrix



The most recently developed encoding standard to be supported by Zint, Grid Matrix became an AIM standard in December 2008. The encoding allows Latin- 1 and Chinese characters within the GB 2312 standard set to be encoded in a checkerboard pattern. Input should be entered as a UTF-8 stream with conversion to GB 2312 being carried out automatically by Zint. The size of the symbol and the error correction capacity can be specified. If you specify both of these values then Zint will make a 'best-fit' attempt to satisfy both conditions. The symbol size can be specified using the setting hmRep_oprop_Barcode_Option2, and the error correction capacity can be specified by using the setting hmRep_oprop_Barcode_Option1 according to the following tables:




Stacked Symbologies

Code 16k (EN 12323)



A more sophisticated method is to use some type of line indexing which indicates to the barcode reader which order the symbols should be read. This is demonstrated by Code 16k which uses a Code128 based system which can stack up to 16 rows in a block. This gives a maximum data capacity of 77 characters or 154 numerical digits and includes two modulo-107 check digits. Code 16k also supports extended ASCII character encoding in the same manner as Code 128.

PDF417 (ISO 15438)



Heavily used in the parcel industry, the PDF417 symbology can encode a vast amount of data into a small space. Zint supports encoding up to the ISO standard maximum symbol size of 925 codewords which (at error correction level 0) allows a maximum data size of 1850 text characters, or 2710 digits. The width of the generated PDF417 symbol can be specified at the command line using the --cols switch followed by a number between 1 and 30, and the amount of check digit information can be specified by using the --security switch followed by a number between 0 and 8 where the number of codewords used for check information is determined by 2(value + 1). If using the API these values are assigned to hmRep_oprop_Barcode_Option2 and hmRep_oprop_Barcode_Option1 respectively. The default level of check information is determined by the amount of data being encoded. International text support is provided using the Latin-1 character set as described in Appendix A. A separate symbology ID can be used to encode Health Industry Barcode (HIBC) data which adds a leading '+' character and a modulo-49 check digit to the encoded data.

Compact PDF417


Also known as truncated PDF417. Options are as for PDF417 above.

MicroPDF417 (ISO 24728)



A variation of the PDF417 standard, MicroPDF417 is intended for applications where symbol size needs to be kept to a minimum. 34 pre- defined symbol sizes are available with 1 - 4 columns and 4 - 44 rows. The maximum size MicroPDF417 symbol can hold 250 alphanumeric characters or 366 digits. The amount of error correction used is dependant on symbol size. The number of columns used can be determined using the hmRep_oprop_Barcode_Option2 as with PDF417. A separate symbology ID can be used to encode Health Industry Barcode (HIBC) data which adds a leading '+' character and a modulo-49 check digit to the encoded data.

Two-Track Symbols

Two-Track Pharmacode



Developed by Laetus, Pharmacode Two-Track is an alternative system to Pharmacode One-Track used for the identification of pharmaceuticals. The symbology is able to encode whole numbers between 4 and 64570080.

PostNet



Used by the United States Postal Service until 2009, the PostNet barcode was used for encoding zip-codes on mail items. PostNet uses numerical input data and includes a modulo-10 check digit. While Zint will encode PostNet symbols of any length, standard lengths as used by USPS were PostNet6 (5 digits ZIP input), PostNet10 (5 digit ZIP + 4 digit user data) and PostNet12 (5 digit ZIP + 6 digit user data).

PLANET



Used by the United States Postal Service until 2009, the PLANET (Postal Alpha Numeric Encoding Technique) barcode was used for encoding routing data on mail items. Planet uses numerical input data and includes a modulo-10 check digit. While Zint will encode PLANET symbols of any length, standard lengths used by USPS were Planet12 (11 digit input) and Planet14 (13 digit input).

4-State Postal Codes



Australia Post 4-State Symbol: Customer Barcodes


Australia Post Standard Customer Barcode, Customer Barcode 2 and Customer Barcode 3 are 37- bar, 52-bar and 67-bar specifications respectively, developed by Australia Post for printing Delivery Point ID (DPID) and customer information on mail items. Valid data characters are 0-9, A-Z, a-z, space and hash (#). A Format Control Code (FCC) is added by Zint and should not be included in the input data. Reed-Solomon error correction data is generated by Zint. Encoding behaviour is determined by the length of the input data according to the formula shown in the following table:



Australia Post 4-State Symbol: Reply Paid Barcode


A Reply Paid version of the Australia Post 4-State Barcode (FCC 45) which requires an 8-digit DPID input.

Australia Post 4-State Symbol: Routing Barcode


A Routing version of the Australia Post 4-State Barcode (FCC 87) which requires an 8-digit DPID input.

Australia Post 4-State Symbol: Redirect Barcode


A Redirection version of the Australia Post 4-State Barcode (FCC 92) which requires an 8-digit DPID input

Dutch Post KIX Code



This Symbology is used by Royal Dutch TPG Post (Netherlands) for Postal code and automatic mail sorting. Data input can consist of numbers 0-9 and letters A-Z and needs to be 11 characters in length. No check digit is included.

Royal Mail 4-State Country Code (RM4SCC)



The RM4SCC standard is used by the Royal Mail in the UK to encode postcode and customer data on mail items. Data input can consist of numbers 0-9 and letters A-Z and usually includes delivery postcode followed by house number. For example "W1J0TR01" for 1 Picadilly Circus in London. Check digit data is generated by Zint.

USPS OneCode



Also known as the Intelligent Mail Barcode and used in the US by the United States Postal Service (USPS), the OneCode system replaced the PostNet and PLANET symbologies in 2009. OneCode is a fixed length (65-bar) symbol which combines routing and customer information in a single symbol. Input data consists of a 20 digit tracking code, followed by a dash (-), followed by a delivery point zip-code which can be 0, 5, 9 or 11 digits in length. For example all of the following inputs are valid data entries: "01234567094987654321"
"01234567094987654321-01234"
"01234567094987654321-012345678"
"01234567094987654321-01234567891"

Japanese Postal Code



Used for address data on mail items for Japan Post. Accepted values are 0-9, A-Z and Dash (-). A modulo 19 check digit is added.

Other Barcode-Like Markings

Facing Identification Mark (FIM)



Used by the United States Postal Service (USPS), the FIM symbology is used to assist automated mail processing. There are only 4 valid symbols which can be generated using the characters A-D as shown in the table below.



Flattermarken



Used for the recognition of page sequences in print-shops, the Flattermarken is not a true barcode symbol and requires precise knowledge of the position of the mark on the page. The Flattermarken system can encode any length numeric data and does not include a check digit.

DAFT Code



This is a method for creating 4-state codes where the data encoding is provided by an external program. Input data should consist of the letters 'D', 'A', 'F' and 'T' where these refer to descender, ascender, full (ascender and descender) and tracker (neither ascender nor descender) respectively. All other characters are ignored.