6. Types of symbology
6.2 Stacked Symbologies
6.2.1 Basic Symbol Stacking
An early innovation to get more information into a symbol, used primarily in the vehicle industry, is to simply stack one-dimensional codes on top of each other. This can be achieved at the command prompt by giving more than one set of input data. For example
zint -d "This" -d "That"
will draw two Code 128 symbols, one on top of the other. The same result can be achieved using the API by executing the ZBarcode_Encode() function more than once on a symbol. For example:
my_symbol->symbology = BARCODE_CODE128; error = ZBarcode_Encode(my_symbol, "This", 0); error = ZBarcode_Encode(my_symbol, "That", 0); error = ZBarcode_Print(my_symbol);
Note that the Human Readable Text will be that of the last data, so it’s best to use the option --notext (API show_hrt = 0).
The stacked barcode rows can be separated by row separator bars by specifying --bind (API output_options |= BARCODE_BIND). The height of the row separator bars in multiples of the X-dimension (minimum and default 1, maximum 4) can be set by --separator (API option_3):
zint --bind --notext --separator=2 -d "This" -d "That"
A more sophisticated method is to use some type of line indexing which indicates to the barcode reader which order the stacked symbols should be read in. This is demonstrated by the symbologies below.
This is a stacked symbology based on Code 128 which can encode extended ASCII code set data up to a maximum length of 2725 characters. The width of the Codablock-F symbol can be set using the --cols option (API option_2). The height (number of rows) can be set using the --rows option (API option_1). Zint does not currently support encoding of GS1 data in Codablock-F symbols.
A separate symbology ID (BARCODE_HIBC_BLOCKF) 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.
6.2.3 Code 16K (EN 12323)
Code 16K uses a Code 128 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. GS1 data encoding is also supported. The minimum number of rows to use can be set using the --rows option (API option_1), with values from 2 to 16.
6.2.4 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 (API option_2) followed by a number between 1 and 30, the number of rows using the --rows switch (API option_3) followed by a number between 3 and 90, and the amount of error correction information can be specified by using the --secure switch (API option_1) followed by a number between 0 and 8 where the number of codewords used for error correction is determined by 2^(value + 1). The default level of error correction is determined by the amount of data being encoded.
This symbology uses Latin-1 character encoding by default but also supports the ECI encoding mechanism. A separate symbology ID (BARCODE_HIBC_PDF) can be used to encode Health Industry Barcode (HIBC) data.
PDF417 supports Structured Append of up to 99,999 symbols and an optional numeric ID of up to 30 digits, which can be set by using the --structapp option (see 4.16 Structured Append) (API structapp). The ID consists of up to 10 triplets, each ranging from "000" to "899". For instance "123456789" would be a valid ID of 3 triplets. However "123456900" would not, as the last triplet "900" exceeds "899". The triplets are 0-filled, for instance "1234" becomes "123004". If an ID is not given, no ID is encoded.
6.2.5 Compact PDF417 (ISO 15438)
Previously known as Truncated PDF417, Compact PDF417 omits some per-row overhead to produce a narrower but less robust symbol. Options are the same as for PDF417 above.
6.2.6 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 predefined symbol sizes are available with 1 - 4 columns and 4 - 44 rows. The maximum amount a MicroPDF417 symbol can hold is 250 alphanumeric characters or 366 digits. The amount of error correction used is dependent on symbol size. The number of columns used can be determined using the --cols switch (API option_2) as with PDF417.
This symbology uses Latin-1 character encoding by default but also supports the ECI encoding mechanism. A separate symbology ID (BARCODE_HIBC_MICPDF) can be used to encode Health Industry Barcode (HIBC) data. MicroPDF417 supports Structured Append the same as PDF417, for which see details.
6.2.7 GS1 DataBar Stacked (ISO 24724)
188.8.131.52 GS1 DataBar Stacked
A stacked variation of the GS1 DataBar Truncated symbol requiring the same input (see 184.108.40.206 GS1 DataBar Omnidirectional and GS1 DataBar Truncated), this symbol is the same as the following GS1 DataBar Stacked Omnidirectional symbol except that its height is reduced, making it suitable for small items when omnidirectional scanning is not required. It can be generated with a two-dimensional component to make a composite symbol.
220.127.116.11 GS1 DataBar Stacked Omnidirectional
A stacked variation of the GS1 DataBar Omnidirectional symbol requiring the same input (see 18.104.22.168 GS1 DataBar Omnidirectional and GS1 DataBar Truncated). The data is encoded in two rows of bars with a central finder pattern. This symbol can be generated with a two-dimensional component to make a composite symbol.
22.214.171.124 GS1 DataBar Expanded Stacked
A stacked variation of the GS1 DataBar Expanded symbol for smaller packages. Input is the same as for GS1 DataBar Expanded (see 126.96.36.199 GS1 DataBar Expanded). In addition the width of the symbol can be altered using the --cols switch (API option_2). In this case the number of columns (values 1 to 11) relates to the number of character pairs on each row of the symbol. Alternatively the --rows switch (API option_3) can be used to specify the maximum number of rows (values 2 to 11), and the number of columns will be adjusted accordingly. This symbol can be generated with a two-dimensional component to make a composite symbol. For symbols with a 2D component the number of columns must be at least 2.
6.2.8 Code 49
Developed in 1987 at Intermec, Code 49 is a cross between UPC and Code 39. It is one of the earliest stacked symbologies and influenced the design of Code 16K a few years later. It supports full 7-bit ASCII input up to a maximum of 49 characters or 81 numeric digits. GS1 data encoding is also supported. The minimum number of rows to use can be set using the --rows option (API option_1), with values from 2 to 8.