6. Types of Symbology
6.1 One-Dimensional Symbols
One-dimensional or linear 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.
6.1.1 Code 11
Developed by Intermec in 1977 for Bell Labs as a high-density barcode
to track small telephone components, Code 11 can encode data consisting
of the digits 0-9 and the dash character (-) up to a
maximum of 140 characters.
zint -b CODE11 -d "9212320967"Two modulo-11 check digits are added by default. To add just one
check digit, set --vers=1 (API option_2 = 1).
To add no check digits, set --vers=2 (API
option_2 = 2).
6.1.2 Code 2 of 5
Code 2 of 5 is a family of one-dimensional self-checking symbols, 8 of which are supported by Zint. Note that the names given to these standards alter from one source to another so you should take care to ensure that you have the right barcode type before using them.
6.1.2.1 Standard Code 2 of 5
Also known as Code 2 of 5 Matrix, and used in industrial applications and photo development, Standard Code 2 of 5 will encode numeric input (digits 0-9) up to a maximum of 112 digits.
zint -b C25STANDARD -d "9212320967"No check digit is added by default. To add a check digit, set
--vers=1 (API option_2 = 1). To add a check
digit but not show it in the Human Readable Text, set
--vers=2 (API option_2 = 2).
6.1.2.2 IATA Code 2 of 5
Used by the International Air Transport Agency (IATA) for baggage handling, this barcode will encode numeric input (digits 0-9) up to a maximum of 80 digits.
zint -b C25IATA -d "9212320967"No check digit is added by default, but can be set the same as for 6.1.2.1 Standard Code 2 of 5.
6.1.2.3 Industrial Code 2 of 5
Industrial Code 2 of 5 can encode numeric input (digits 0-9) up to a maximum of 79 digits.
zint -b C25IND -d "9212320967"No check digit is added by default, but can be set the same as for 6.1.2.1 Standard Code 2 of 5.
6.1.2.4 Interleaved Code 2 of 5 (ISO 16390)
A high-density barcode that 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. A maximum of 62 pairs (124 digits) can be encoded.
zint -b C25INTER --compliantheight -d "9212320967"No check digit is added by default, but can be set the same as for 6.1.2.1 Standard Code 2 of 5.
6.1.2.5 Code 2 of 5 Data Logic
Data Logic does not include a check digit by default and can encode numeric input (digits 0-9) up to a maximum of 113 digits.
zint -b C25LOGIC -d "9212320967"No check digit is added by default, but can be set the same as for 6.1.2.1 Standard Code 2 of 5.
6.1.2.6 ITF-14
ITF-14, also known as UPC Shipping Container Symbol or Case Code, is based on Interleaved Code 2 of 5 and is designed to encode a GTIN-14. It takes a 13-digit input, which will be prefixed with leading zeroes if less than 13 digits entered, or a 14-digit input if the standard GS1 check digit is given, in which case the check digit will be verified. A standard GS1 check digit is added by Zint unless already given.
zint -b ITF14 --compliantheight -d "9212320967145"If no border option is specified Zint defaults to adding a bounding
box with a border width of 5. This behaviour can be overridden by using
the --bind option (API
output_options |= BARCODE_BIND). Similarly the border width
can be overridden using --border (API
border_width). If a symbol with no border is required this
can be achieved by explicitly setting the border type to box (or bind or
bindtop) and leaving the border width 0.
zint -b ITF14 --box --compliantheight -d "9212320967145"6.1.2.7 Deutsche Post Leitcode
Leitcode is based on Interleaved Code 2 of 5 and is used by Deutsche Post for routing purposes. Leitcode requires a 13-digit numerical input to which Zint adds a check digit.
zint -b DPLEIT -d "9212320967145"6.1.2.8 Deutsche Post Identcode
Identcode is based on Interleaved Code 2 of 5 and is used by Deutsche Post for identification purposes. Identcode requires an 11-digit numerical input to which Zint adds a check digit.
zint -b DPIDENT -d "91232096712"6.1.3 UPC (Universal Product Code) (ISO 15420)
6.1.3.1 UPC Version A
UPC-A is used in the United States for retail applications, and encodes a GTIN-12, a 12-digit Global Trade Item Number that includes a standard GS1 check digit.
zint -b UPCA --compliantheight -d "01234500005"Input up to 11 digits may be given, to which a check digit will be
added by Zint. A 12-digit input including the check digit may also be
supplied, in which case Zint will verify the check digit, or you may use
symbology BARCODE_UPCA_CHK (35), which verifies that the
last digit is a check digit. Input less than 11 digits will be
zero-filled.
In addition 2-digit and 5-digit add-on symbols can be added, their
data separated from the main data by a '+' character or a
space. For example, to draw a UPC-A symbol with the data “01234500005”
and 5-digit add-on data “12345” use the command:
or using the API:
symbol->symbology = BARCODE_UPCA;
/* Using '+' */
error = ZBarcode_Encode_and_Print(symbol, "01234500005+12345", 0, 0);
/* Or a space */
error = ZBarcode_Encode_and_Print(symbol, "01234500005 12345", 0, 0);zint -b UPCA --compliantheight -d "01234500005+12345"A quiet zone indicator can be added to the HRT by setting
--guardwhitespace (API
output_options |= EANUPC_GUARD_WHITESPACE). For UPC, this
is only relevant when there is an add-on:
or using the API:
symbol->symbology = BARCODE_UPCA;
symbol->output_options |= EANUPC_GUARD_WHITESPACE;
error = ZBarcode_Encode_and_Print(symbol, "01234500005+12345", 0, 0);zint -b UPCA --compliantheight -d "01234500005+12345" --guardwhitespaceYou can adjust the gap between the main symbol and an add-on in
integral multiples of the X-dimension by setting --addongap
(API option_2) to a value between 9 (default) and 12. The
height in X-dimensions that the guard bars descend below the main bars
can be adjusted by setting --guarddescent (API
guard_descent) to a value between 0.0 and 20.0 (default
5.0).
6.1.3.2 UPC Version E
UPC-E is a zero-compressed version of UPC-A developed for smaller packages, which takes up to 7 digits as input. A standard GS1 check digit will be added by Zint. If 7 digits are given then the first must be ‘0’ or ‘1’ (the latter is known as number system 1 and is non-standard). Input less than 7 digits will be zero-filled.
zint -b UPCE --compliantheight -d "123455"An 8-digit input including the check digit may also be supplied, in
which case Zint will verify the check digit, or the symbology
BARCODE_UPCE_CHK (38) may be used, which will verify that
the last digit is a check digit before encoding.
As with UPC-A, 2-digit and 5-digit add-on symbols can be added using
a '+' character or a space as a separator, and a quiet zone
indicator can be added when there is an add-on by setting
--guardwhitespace (API
output_options |= EANUPC_GUARD_WHITESPACE):
zint -b UPCE --compliantheight -d "123455+12" --guardwhitespaceYou can adjust the gap between the main symbol and an add-on in
integral multiples of the X-dimension by setting --addongap
(API option_2) to a value between 7 (default) and 12. The
height in X-dimensions that the guard bars descend below the main bars
can be adjusted by setting --guarddescent (API
guard_descent) to a value between 0.0 and 20.0 (default
5.0).
6.1.4 EAN (European Article Number) (ISO 15420)
The EAN system, which stands for European Article Number but it is also known as International Article Number, is a backward-compatible extension of UPC, used in retail across Europe and internationally. It defines the symbologies EAN-13, EAN-8 and ISBN (a subset of EAN-13).
6.1.4.1 EAN-13
EAN-13 encodes a GTIN-13, a 13-digit Global Trade Item Number that includes a standard GS1 check digit.
zint -b EAN13 --compliantheight -d "952012345678"Input up to 12 digits may be given, to which a check digit will be added by Zint, or a 13-digit input can be supplied in which case Zint will validate the check digit. Input less than 12 digits will be zero-filled.
A 2-digit or 5-digit add-on can be added by using a ‘+’ or space character as with UPC symbols. For example:
will encode an EAN-13 symbol with a 2-digit add-on. As before these results can be achieved using the API:
symbol->symbology = BARCODE_EAN13;
error = ZBarcode_Encode_and_Print(symbol, "952012345678+21", 0, 0);zint -b EAN13 --compliantheight -d "952012345678+21"Options to add quiet zone indicators and to adjust the add-on gap and the guard bar descent height are the same as for 6.1.3.2 UPC Version E. For instance:
zint -b EAN13 --compliantheight -d "9520123456788"
–guarddescent=2.5 –guardwhitespace6.1.4.2 EAN-8
EAN-8 is a shortened version of EAN-13, encoding a GTIN-8 (a GTIN-13 with 5 leading zeroes implied), for use with small packages.
zint -b EAN8 --compliantheight -d "9520000"Input up to 7 digits may be supplied, to which Zint will add a standard GS1 check digit. An 8-digit input including the check digit may also be given, in which case Zint will verify the check digit. Input less than 7 digits will be zero-filled.
Options to add quiet zone indicators and to adjust the guard bar descent height are the same as for 6.1.3.2 UPC Version E. For instance:
or using the API:
symbol->symbology = BARCODE_EAN8;
symbol->output_options |= EANUPC_GUARD_WHITESPACE;
error = ZBarcode_Encode_and_Print(symbol, "9520000", 0, 0);zint -b EAN8 --compliantheight -d "9520000"
–guardwhitespace2-digit and 5-digit add-ons may also be added, and the gap adjusted, as with EAN-13, but this usage is non-standard and Zint will issue a warning on use.
6.1.4.3 ISBN (including SBN 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.
zint -b ISBNX --compliantheight -d "9789295055124"As with EAN-13, a quiet zone indicator can be added using
--guardwhitespace:
zint -b ISBNX --compliantheight -d "9789295055124" --guardwhitespace2-digit and 5-digit add-on symbols can be added using a
+ or space character, and there are options to adjust the
add-on gap and the guard bar descent height - see 6.1.3.2 UPC Version E.
6.1.4.4 EAN/UPC Add-Ons (standalone)
As a convenience, 2-digit and 5-digit add-ons may be generated as
standalone symbols using the symbologies BARCODE_EAN_2ADDON
(11) and BARCODE_EAN_5ADDON (12).
zint -b EAN_2ADDON --compliantheight -d "12"As with the main EAN/UPC symbols a quiet zone indicator can be added
using ---guardwhitespace. For instance
will generate a standalone 5-digit add-on with quiet zone guards, or using the API:
symbol->symbology = BARCODE_EAN_5ADDON;
symbol->output_options |= EANUPC_GUARD_WHITESPACE;
error = ZBarcode_Encode_and_Print(symbol, "54321", 0, 0);zint -b EAN_5ADDON --compliantheight -d "54321"
–guardwhitespace6.1.5 Plessey
6.1.5.1 UK Plessey
Also known as Plessey Code, this symbology was developed by the Plessey Company Ltd. in the UK. The symbol can encode data consisting of digits (0-9) or letters A-F (i.e. hexadecimal digits) up to a maximum of 67 characters.
zint -b PLESSEY -d "C64"The symbol includes two hidden CRC check digits, which may be shown
in the Human Readable Text by setting --vers=1 (API
option_2 = 1).
6.1.5.2 MSI Plessey
Based on UK Plessey and developed by MSI Data Corporation, MSI Plessey can encode numeric (digits 0-9) input of up to 92 digits.
zint -b MSI_PLESSEY -d "6502" --vers=2MSI Plessey has a range of check digit options that are selectable by
setting --vers (API option_2), shown in the
table below:
| Value | Check Digits |
|---|---|
| 0 | None |
| 1 | Modulo-10 (Luhn) |
| 2 | Modulo-10 & Modulo-10 |
| 3 | Modulo-11 (IBM) |
| 4 | Modulo-11 (IBM) & Modulo-10 |
| 5 | Modulo-11 (NCR) |
| 6 | Modulo-11 (NCR) & Modulo-10 |
To not show the check digit or digits in the Human Readable Text, add
10 to the --vers value. For example --vers=12
(API option_2 = 12) will add two hidden modulo-10 check
digits.
6.1.6 Telepen
6.1.6.1 Telepen Alpha
Telepen Alpha was developed by SB Electronic Systems Limited and can encode ASCII text input, up to a maximum of 69 characters. Telepen includes a hidden modulo-127 check digit, added by Zint.
zint -b TELEPEN --compliantheight -d "Z80"6.1.6.2 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). Up to 136 digits can be encoded. Telepen Numeric includes
a hidden modulo-127 check digit which is added by Zint.
zint -b TELEPEN_NUM --compliantheight -d "466X33"6.1.7 Code 39
6.1.7.1 Standard Code 39 (ISO 16388)
Standard Code 39 was introduced in 1975 by Intermec. Input data can
be up to 86 characters in length and can include the characters 0-9,
A-Z, dash (-), full stop (.), space, asterisk
(*), dollar ($), slash (/), plus
(+) and percent (%).
zint -b CODE39 --compliantheight -d "1A" --vers=1The standard does not require a check digit but a modulo-43 check
digit can be added if desired by setting --vers=1 (API
option_2 = 1). To add a check digit but not show it in the
Human Readable Text, set --vers=2 (API
option_2 = 2).
6.1.7.2 Extended Code 39
Also known as Code 39e and Code39+, this symbology expands on Standard Code 39 to provide support for the full 7-bit ASCII character set.
zint -b EXCODE39 --compliantheight -d "123.45#@fd"The check digit options are the same as for 6.1.7.1 Standard Code 39 (ISO 16388).
6.1.7.3 Code 93
A variation of Extended Code 39, Code 93 also supports full ASCII
text, accepting up to 123 characters. Two check characters are added by
Zint. By default these check characters are not shown in the Human
Readable Text, but may be shown by setting --vers=1 (API
option_2 = 1).
zint -b CODE93 --compliantheight -d "C93"6.1.7.4 PZN (Pharmazentralnummer)
PZN is a Code 39 based symbology used by the pharmaceutical industry in Germany. PZN encodes a 7-digit number to which Zint will add a modulo-11 check digit (PZN8). Input less than 7 digits will be zero-filled. An 8-digit input can be supplied in which case Zint will validate the check digit.
zint -b PZN --compliantheight -d "2758089"To encode a PZN7 (obsolete since 2013) instead set
--vers=1 (API option_2 = 1) and supply up to 7
digits. As with PZN8, a modulo-11 check digit will be added or if 7
digits supplied the check digit validated.
6.1.7.5 LOGMARS
LOGMARS (Logistics Applications of Automated Marking and Reading Symbols) is a variation of the Code 39 symbology used by the U.S. Department of Defense. LOGMARS encodes the same character set as 6.1.7.1 Standard Code 39 (ISO 16388), and the check digit options are also the same. Input is restricted to a maximum of 30 characters.
zint -b LOGMARS --compliantheight -d "12345/ABCDE" --vers=16.1.7.6 Code 32
A variation of Code 39 used by the Italian Ministry of Health (“Ministero della Sanità”) for encoding identifiers on pharmaceutical products. This symbology requires a numeric input up to 8 digits in length. A check digit is added by Zint.
zint -b CODE32 --compliantheight -d "14352312"6.1.7.7 HIBC Code 39
This variant 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.
zint -b HIBC_39 --compliantheight -d "14352312"6.1.7.8 Vehicle Identification Number (VIN)
A variation of Code 39 that for vehicle identification numbers used
in North America (first character '1' to '5')
has a check character verification stage. A 17 character input (0-9, and
A-Z excluding 'I', 'O' and 'Q')
is required.
zint -b VIN -d "2FTPX28L0XCA15511" --vers=1An invisible Import character prefix 'I' can be added by
setting --vers=1 (API option_2 = 1).
6.1.8 Codabar (EN 798)
Also known as Rationalized Codabar, Code 27, 2 of 7 Code, NW-7 (Japan), USD-4 and Monarch, this symbology was developed in 1972 from earlier versions by Pitney Bowes-Alpex for retail price marking. The American Blood Commission adopted Codabar in 1979 as the standard barcode for blood products.
zint -b CODABAR --compliantheight -d "A37859B"Codabar can encode up to 103 characters 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 character is generated by default, but a hidden modulo-16
one can be added by setting --vers=1 (API
option_2 = 1). To have the check character appear in the
Human Readable Text, set --vers=2 (API
option_2 = 2).
6.1.9 Pharmacode One-Track
Developed by Laetus, Pharmacode One-Track is used for the identification of pharmaceuticals. The symbology is able to encode whole numbers between 3 and 131070.
zint -b PHARMA --compliantheight -d "130170"6.1.10 Code 128
6.1.10.1 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-Code Set system to compress the data into a smaller symbol. Zint automatically switches between Code Sets A, B and C (but see below) and adds a hidden modulo-103 check digit.
zint -b CODE128 --bind -d "130170X178"Code 128 is the default barcode symbology used by Zint. In addition Zint supports the encoding of ISO/IEC 8859-1 (non-English) characters in Code 128 symbols. The ISO/IEC 8859-1 character set is shown in Annex A.2 Latin Alphabet No. 1 (ISO/IEC 8859-1).
Manual switching of Code Sets is possible using the
--extraesc option (API
input_mode |= EXTRA_ESCAPE_MODE), which apart from
processing normal escape sequences also processes the Code 128-specific
escapes \^A, \^B, \^C and
\^@ (the latter turns off manual Code Set selection). For
instance the following will force switching to Code Set B for the data
"5678" (normally Code Set C would be used throughout):
The manually selected Code Set will apply until the next Code Set
escape sequence or until a \^@, with the exception that
data that cannot be represented in that Code Set will be switched as
appropriate. If the data contains an extra escape sequence, it can be
escaped by doubling the caret (^). For instance
will encode the data "ABC\^BDEF" in Code Set A.
There is also the extra escape \^1, which will encode a
special Function Code 1 character (FNC1) anywhere you
choose in the data, for instance
Zint can encode a maximum of 102 symbol characters, which allows for e.g. 202 all-numeric or 101 all-uppercase characters. Sizes above 120 digits (60 alphanumerics) are not recommended.
6.1.10.2 Code 128 Suppress Code Set C (Code Sets A and B only)
It is sometimes advantageous to stop Code 128 from using Code Set C
which compresses numerical data. The BARCODE_CODE128AB22 variant (symbology 60) suppresses
Code Set C in favour of Code Sets A and B.
zint -b CODE128AB -d "130170X178"Note that the special extra escapes mentioned above are not available for this variant (nor for any other).
6.1.10.3 GS1-128
A variation of Code 128 previously known as UCC/EAN-128, this symbology is defined by the GS1 General Specifications. Data should be in one of the formats described in 4.11.3.1 GS1 Data Entry. Here we will use the square bracket format.
zint -b GS1_128 --compliantheight -d "[01]98898765432106[3202]012345[15]991231"Fixed length data should be entered at the appropriate length for correct encoding. GS1-128 does not support extended ASCII (ISO/IEC 8859-1) characters. Check digits for GTIN data AI (01) are not generated and need to be included in the input data. The following is an example of a valid GS1-128 input:
6.1.10.4 EAN-14
A shorter version of GS1-128 which encodes GTIN-14 data only, EAN-14
takes a 13-digit input, which will be prefixed with leading zeroes if
less than 13 digits entered, or a 14-digit number if the standard GS1
check digit is given, in which case the check digit will be verified.
The GS1 check digit (if not given) and HRT-only AI "(01)"
are added by Zint.
zint -b EAN14 --compliantheight -d "9889876543210"6.1.10.5 NVE-18 (SSCC-18)
A variation of Code 128 the ‘Nummer der Versandeinheit’ standard,
also known as SSCC-18 (Serial Shipping Container Code), includes both a
visible standard GS1 check digit and a hidden modulo-103 check digit.
NVE-18 takes a 17-digit input, which will be prefixed with leading zeros
if less than 17 digits given, or an 18-digit input if the GS1 check
digit is included, in which case the check digit will be verified. Check
digit(s) and HRT-only AI "(00)" are added by Zint.
zint -b NVE18 --compliantheight -d "37612345000001003"6.1.10.6 HIBC Code 128
This variation 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.
zint -b HIBC_128 -d "A123BJC5D6E71"6.1.10.7 DPD Code
Another variation of Code 128 as used by DPD (Deutscher Paketdienst).
zint -b DPD --compliantheight -d "000393206219912345678101040"DPD Code requires a 27 or 28 character input. For 28 character input,
the first character is an identification tag (Barcode ID), which should
usually be "%" (ASCII 37). If 27 characters are supplied,
"%" will be prefixed by Zint (except if marked as a
“relabel”, see below). The rest of the 27-character input must be
alphanumeric, and is of the form:
| Destination Post Code | Tracking Number | Service Code | Destination Country Code |
|---|---|---|---|
| PPPPPPP (7 alphanumerics) | TTTTTTTTTTTTTT (14 alphanumerics) | SSS (3 digits) | CCC (3-digit ISO 3166-1) |
A warning will be generated if the Service Code, the Destination Country Code, or the last 10 characters of the Tracking Number are non-numeric.
Zint formats the Human Readable Text as specified by DPD, leaving out the identification tag, and adds a modulo-36 check character to the text (not to the barcode itself), thus:
PPPP PPP TTTT TTTT TTTT TT SSS CCC D
By default a top boundary bar is added, with default width 3X. The
width can be overridden using --border (API
border_width). For a symbol with no top boundary bar,
explicitly set the border type to bindtop (or bind or box) and leave the
border width 0.
A DPD Code can be marked as a “relabel” by specifying
--vers=1 (API option_2 = 1), which omits the
identification tag and prints the barcode at half height. In this case,
an input of 27 alphanumeric characters is required.
6.1.10.8 UPU S10
The Universal Postal Union S10 variant of Code 128 encodes 13
characters in the format "SSNNNNNNNNXCC", where
"SS" is a two-character alphabetic service indicator,
"NNNNNNNN" is an 8-digit serial number, "X" is
a modulo-11 check digit, and "CC" is a two-character ISO
3166-1 country code.
zint -b UPU_S10 --compliantheight -d "EE876543216CA"The check digit may be omitted in which case Zint will add it. Warnings will be generated if the service indicator is non-standard or the country code is not ISO 3361-1.
6.1.11 GS1 DataBar (ISO 24724)
Previously known as RSS (Reduced Spaced Symbology), these symbols were introduced in 2006 by GS1 to efficiently encode GS1 data. Stacked counterparts (apart from GS1 DataBar Limited) are also available - see 6.2.7 GS1 DataBar Stacked (ISO 24724).
See 6.3 GS1 Composite Symbols (ISO 24723) to find out how to generate DataBar symbols with 2D components.
6.1.11.1 GS1 DataBar Omnidirectional and GS1 DataBar Truncated
Previously known as RSS-14 this standard encodes a 13-digit item
code. A check digit and HRT-only Application Identifier of
"(01)" are added by Zint. (A 14-digit code that appends the
standard GS1 check digit may be given, in which case the check digit
will be verified.) Input less than 13 digits will be zero-filled.
zint -b DBAR_OMN --compliantheight -d "0950110153001"GS1 DataBar Omnidirectional symbols should have a height of 33 or greater. To produce a GS1 DataBar Truncated symbol set the symbol height to a value between 13 and 32. Truncated symbols may not be scannable by omnidirectional scanners.
zint -b DBAR_OMN -d "0950110153001" --height=136.1.11.2 GS1 DataBar Limited
Previously known as RSS Limited this standard encodes a 13-digit item
code and can be used in the same way as GS1 DataBar Omnidirectional
above. GS1 DataBar Limited, however, is limited to data starting with
digits 0 and 1 (i.e. numbers in the range 0 to 1999999999999). As with
GS1 DataBar Omnidirectional a check digit and HRT-only Application
Identifier of "(01)" are added by Zint, and a 14-digit code
may be given in which case the check digit will be verified. Input less
than 13 digits will be zero-filled.
zint -b DBAR_LTD --compliantheight -d "0950110153001"6.1.11.3 GS1 DataBar Expanded
Previously known as RSS Expanded this is a variable length symbology capable of encoding multiple AIs in a single symbol. Data should be in one of the formats described in 4.11.3.1 GS1 Data Entry, and will be displayed using parentheses (round brackets) in the Human Readable Text.
zint -b DBAR_EXP --compliantheight -d "[01]98898765432106[3202]012345[15]991231"The GTIN-14 data for AI (01) must include the standard GS1 check digit as this is not calculated by Zint when this symbology is encoded. Data for fixed-length AIs must be entered at the appropriate length. The maximum capacity is 74 numerics or 41 alphanumerics. The following is an example of a valid GS1 DataBar Expanded input:
6.1.12 Korea Post Barcode
The Korean Postal Barcode is used to encode a 6-digit number and includes one check digit.
zint -b KOREAPOST -d "923457"6.1.13 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 the --vers option (API
option_2). 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.
zint -b CHANNEL -d "453678" --compliantheightThe maximum values permitted depend on the number of channels used as shown in the table below:
| Channels | Minimum Value | Maximum Value |
|---|---|---|
| 3 | 00 | 26 |
| 4 | 000 | 292 |
| 5 | 0000 | 3493 |
| 6 | 00000 | 44072 |
| 7 | 000000 | 576688 |
| 8 | 0000000 | 7742862 |
6.1.14 BC412 (SEMI T1-95)
Designed by IBM for marking silicon wafers, each BC412 character is
represented by 4 bars of a single size, interleaved with 4 spaces of
varying sizes that total 8 (hence 4 bars in 12). Zint implements the
SEMI T1-95 standard, where input must be alphanumeric, excluding the
letter O, and must be from 7 to 18 characters in length. A
single check character is added by Zint, appearing in the 2nd character
position. Lowercase input is automatically made uppercase.
zint -b BC412 -d "AQ45670" --compliantheight6.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
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:
symbol->symbology = BARCODE_CODE128;
error = ZBarcode_Encode(symbol, "This", 0);
error = ZBarcode_Encode(symbol, "That", 0);
error = ZBarcode_Print(symbol);zint -d "This" -d "That"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 integral multiples of the X-dimension (minimum and
default 1, maximum 4) can be set by --separator (API
option_3):
zint --notext --bind --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.
6.2.2 Codablock F
This is a stacked symbology based on Code 128 which can encode Latin-1 data up to a maximum length of 2726 symbol characters, meaning for instance up to 2726 all ASCII characters, or 5452 all numeric, or up to 1363 all extended ASCII (ISO/IEC 8859-1).
zint -b CODABLOCKF -d "CODABLOCK F Symbology" --rows=3The width of the Codablock F symbol can be set using the
--cols option (API option_2), to a value
between 9 and 67. The height (number of rows) can be set using the
--rows option (API option_1), with a maximum
of 44. 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, invented by Ted Williams for LaserLight Systems in 1988,
uses a Code 128 based system which can stack up to 16 fixed-width 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 ISO/IEC 8859-1 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.
zint -b CODE16K --compliantheight -d "ab0123456789"6.2.4 PDF417 (ISO 15438)
Heavily used in the parcel industry, the PDF417 symbology can encode a large 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.
zint -b PDF417 -d "PDF417"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.
For a faster but less optimal encodation, the --fast
option (API input_mode |= FAST_MODE) may be used.
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.17
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.
zint -b PDF417COMP -d "PDF417"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. Its size
ranges over 1 - 4 data 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 data columns used can be determined using the
--cols switch (API option_2) as with PDF417.
The amount of data determines the number of rows.
zint -b MICROPDF417 -d "12345678"MicroPDF417 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.
FAST_MODE and Structured Append are supported the same
as for PDF417, for which see details.
6.2.7 GS1 DataBar Stacked (ISO 24724)
The following are stacked counterparts of those in 6.1.11 GS1 DataBar (ISO 24724), GS1 DataBar Limited excluded.
See 6.3 GS1 Composite Symbols (ISO 24723) to find out how to generate DataBar Stacked symbols with 2D components.
6.2.7.1 GS1 DataBar Stacked
A stacked variation of the GS1 DataBar Truncated symbol requiring the same input (see 6.1.11.1 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 and its central separator is a single row, making it suitable for small items when omnidirectional scanning is not required.
zint -b DBAR_STK --compliantheight -d "9889876543210"6.2.7.2 GS1 DataBar Stacked Omnidirectional
A stacked variation of the GS1 DataBar Omnidirectional symbol requiring the same input (see 6.1.11.1 GS1 DataBar Omnidirectional and GS1 DataBar Truncated). The data is encoded in two rows of bars with a central 3-row separator.
zint -b DBAR_OMNSTK --compliantheight -d "9889876543210"6.2.7.3 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 6.1.11.3 GS1 DataBar Expanded), with the same maximum capacity.
zint -b DBAR_EXPSTK --compliantheight -d "[01]98898765432106[3202]012345[15]991231"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.
If generated with a 2D component (6.3 GS1 Composite Symbols (ISO 24723)), 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 year 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 fixed-width rows to use can be
set using the --rows option (API option_1),
with values from 2 to 8.
zint -b CODE49 --compliantheight -d "MULTIPLE ROWS IN CODE 49"6.3 GS1 Composite Symbols (ISO 24723)
GS1 Composite symbols employ a mixture of components to give more
comprehensive information about a product. The permissible contents of a
composite symbol is determined by the terms of the GS1 General
Specifications. Composite symbols consist of a linear component which
can be an EAN, UPC, GS1-128 or GS1 DataBar symbol, a two-dimensional
(2D) component which is based on PDF417 or MicroPDF417, and a separator
pattern. The type of linear component to be used is determined using the
-b or --barcode switch (API
symbology) as with other encoding methods. Valid values are
shown below.
| Numeric Value | Name | Barcode Name |
|---|---|---|
| 131 | BARCODE_GS1_128_CC | GS1 Composite Symbol with GS1-128 linear component |
| 132 | BARCODE_DBAR_OMN_CC | GS1 Composite Symbol with GS1 DataBar Omnidirectional linear component |
| 133 | BARCODE_DBAR_LTD_CC | GS1 Composite Symbol with GS1 DataBar Limited linear component |
| 134 | BARCODE_DBAR_EXP_CC | GS1 Composite Symbol with GS1 DataBar Expanded linear component |
| 135 | BARCODE_UPCA_CC | GS1 Composite Symbol with UPC-A linear component |
| 136 | BARCODE_UPCE_CC | GS1 Composite Symbol with UPC-E linear component |
| 137 | BARCODE_DBAR_STK_CC | GS1 Composite Symbol with GS1 DataBar Stacked component |
| 138 | BARCODE_DBAR_OMNSTK_CC | GS1 Composite Symbol with GS1 DataBar Stacked Omnidirectional component |
| 139 | BARCODE_DBAR_EXPSTK_CC | GS1 Composite Symbol with GS1 DataBar Expanded Stacked component |
| 148 | BARCODE_EAN8_CC | GS1 Composite Symbol with EAN-8 linear component |
| 149 | BARCODE_EAN13_CC | GS1 Composite Symbol with EAN-13 linear component |
The data to be encoded in the linear component of a composite symbol
should be entered into a primary string with the data for the 2D
component being entered in the normal way. To do this at the command
prompt use the --primary switch (API primary).
For example:
This creates an EAN-13 linear component with the data
"331234567890" and a 2D CC-A (see below) component with the data
"(99)1234-abcd". The same results can be achieved using the
API as shown below:
symbol->symbology = BARCODE_EAN13_CC;
symbol->option_1 = 1;
strcpy(symbol->primary, "331234567890");
ZBarcode_Encode_and_Print(symbol, "[99]1234-abcd", 0, 0);2-digit and 5-digit add-on data can be used with EAN and UPC symbols
using the '+' character as described in sections 6.1.3 UPC (Universal
Product Code) (ISO 15420) and 6.1.4 EAN (European
Article Number) (ISO 15420).
The 2D component of a composite symbol can use one of three systems:
CC-A, CC-B and CC-C, as described below. The 2D component type can be
selected automatically by Zint dependent on the length of the input
string. Alternatively the three methods can be accessed using the
--mode prompt (API option_1) followed by 1, 2
or 3 for CC-A, CC-B or CC-C respectively.
6.3.1 CC-A
This system uses a variation of MicroPDF417 which is optimised to fit
into a small space. The size of the 2D component and the amount of error
correction is determined by the amount of data to be encoded and the
type of linear component which is being used. CC-A can encode up to 56
numeric digits (including AIs) or an alphanumeric string of shorter
length (e.g. if all capitals, at most 30, excluding AI). To select CC-A
use --mode=1 (API option_1 = 1).
zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=1 --primary=3312345678906.3.2 CC-B
This system uses MicroPDF417 to encode the 2D component. The size of
the 2D component and the amount of error correction is determined by the
amount of data to be encoded and the type of linear component which is
being used. CC-B can encode up to 338 numeric digits or an alphanumeric
string of shorter length. To select CC-B use --mode=2 (API
option_1 = 2).
zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=2 --primary=3312345678906.3.3 CC-C
This system uses PDF417 and can only be used in conjunction with a
GS1-128 linear component. CC-C can encode up to 2361 numeric digits or
an alphanumeric string of shorter length. To select CC-C use
--mode=3 (API option_1 = 3).
zint -b GS1_128_CC --compliantheight -d "[99]1234-abcd" --mode=3 --primary="[01]03312345678903"6.4 Two-Track Symbols
6.4.1 Pharmacode Two-Track
Developed by Laetus, Pharmacode Two-Track is an alternative system to Pharmacode One-Track (see 6.1.9 Pharmacode One-Track) used for the identification of pharmaceuticals. The symbology is able to encode whole numbers between 4 and 64570080.
zint -b PHARMA_TWO --compliantheight -d "29876543"6.4.2 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 up to 38 digits in length, standard
lengths as used by USPS were PostNet6 (5-digit ZIP input),
PostNet10 (5-digit ZIP + 4-digit user data) and
PostNet12 (5-digit ZIP + 6-digit user data), and a warning
will be issued if the input length is not one of these.
zint -b POSTNET --compliantheight -d "12345678901"6.4.3 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 up to 38 digits in length, standard lengths used by USPS were
Planet12 (11-digit input) and Planet14
(13-digit input), and as with POSTNET a warning will be issued if the
length is not one of these.
zint -b PLANET --compliantheight -d "4012345235636"6.4.4 Brazilian CEPNet
Based on POSTNET, the CEPNet symbol is used by Correios, the Brazilian postal service, to encode CEP (Código de Endereçamento Postal) numbers on mail items. Input should consist of eight digits with the check digit being automatically added by Zint.
zint -b CEPNET --compliantheight -d "12345678"6.4.5 DX Film Edge Barcode
Introduced by Kodak in the 1980s, the DX (Digital Index) barcode is printed on the bottom edge of 35mm film to aid in the reordering and post-processing of prints.
zint -b DXFILMEDGE --compliantheight -d "112-1/10A"The data can be in two parts. The first part (required) is the “DX
number”, identifying the manufacturer and film type - the National
Association of Photographic Manufacturers (NAPM) number. The second
part, which is optional and if present is separated from the first by a
slash (/), gives the frame number.
The DX number is in either of two formats. The first format is a
number of 1 to 4 digits (“DX Extract”) or 6 digits (“DX Full”), but for
the 6-digit version the first and last digit are ignored, leaving a
4-digit DX Extract number in any case, which must be in the range 16 to
2047. The second format "NNN-NN" represents the DX Extract
as two numbers separated by a dash (-), the first number
being 1 to 3 digits (range 1 to 127) and the second 1 to 2 digits (range
0 to 15).23
The optional frame number is a number in the range 0 to 63, and may
have a half frame indicator "A" appended. Special character
sequences (with or without a half frame indicator appended) may also be
used: "S" or "X" means frame number 62,
"K" or "00" means frame number 63, and
"F" means frame number 0.
A parity bit is automatically added by Zint.
6.5 4-State Postal Codes
6.5.1 Australia Post 4-State Symbols
6.5.1.1 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.
zint -b AUSPOST --compliantheight -d "96184209"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.
| Input Length | Required Input Format | Symbol Length | FCC | Encoding Table |
|---|---|---|---|---|
| 8 | 99999999 | 37-bar | 11 | None |
| 13 | 99999999AAAAA | 52-bar | 59 | C |
| 16 | 9999999999999999 | 52-bar | 59 | N |
| 18 | 99999999AAAAAAAAAA | 67-bar | 62 | C |
| 23 | 99999999999999999999999 | 67-bar | 62 | N |
6.5.1.2 Reply Paid Barcode
A Reply Paid version of the Australia Post 4-State Barcode (FCC 45) which requires an 8-digit DPID input.
zint -b AUSREPLY --compliantheight -d "12345678"6.5.1.3 Routing Barcode
A Routing version of the Australia Post 4-State Barcode (FCC 87) which requires an 8-digit DPID input.
zint -b AUSROUTE --compliantheight -d "34567890"6.5.1.4 Redirect Barcode
A Redirection version of the Australia Post 4-State Barcode (FCC 92) which requires an 8-digit DPID input.
zint -b AUSREDIRECT --compliantheight -d "98765432"6.5.2 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.
zint -b KIX --compliantheight -d "2500GG30250"6.5.3 Royal Mail 4-State Customer 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
Piccadilly Circus in London. Check digit data is generated by Zint.
zint -b RM4SCC --compliantheight -d "W1J0TR01"6.5.4 Royal Mail 4-State Mailmark
Developed in 2014 as a replacement for RM4SCC this 4-state symbol includes Reed- Solomon error correction.
zint -b MAILMARK_4S --compliantheight -d "21B2254800659JW5O9QA6Y"Input is a pre-formatted alphanumeric string of 22 (for Barcode C) or 26 (for Barcode L) characters, producing a symbol with 66 or 78 bars respectively. The rules for the input data are complex, as summarized in the following table.
| Format | Version ID | Class | Supply Chain ID | Item ID | Destination+DPS |
|---|---|---|---|---|---|
| 1 digit (0-4) | 1 digit (0-3) | 1 alphanum. (0-9A-E) | 2 digits (C) or 6 digits (L) | 8 digits | 9 alphanumerics (1 of 6 patterns) |
The 6 Destination+DPS (Destination Post Code plus Delivery Point Suffix) patterns are:
ANNLLNLSS | AANNLLNLS | ANNNLLNLS | AANNNLLNL | ANANLLNLS | AANANLLNL |
where 'A' stands for full alphabetic (A-Z),
'L' for limited alphabetic (A-Z less
'CIKMOV'), 'N' for numeric (0-9), and
'S' for space.
Four of the permitted patterns include a number of trailing space
characters - these will be appended by Zint if not included in the input
data. A special fixed string "XY11 " (5 trailing
spaces, inclusion optional) designates an international destination.
For the two-dimensional Data Matrix-based version, see 6.6.2 Royal Mail 2D Mailmark (CMDM) (Data Matrix).
6.5.5 USPS Intelligent Mail
Also known as the OneCode barcode and used in the U.S. by the United States Postal Service (USPS), the Intelligent Mail system replaced the POSTNET and PLANET symbologies in 2009.
zint -b USPS_IMAIL --compliantheight -d "01234567094987654321-01234"Intelligent Mail 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"
6.5.6 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
by Zint.
zint -b JAPANPOST --compliantheight -d "15400233-16-4-205"6.5.7 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 invalid.
zint -b DAFT -d "AAFDTTDAFADTFTTFFFDATFTADTTFFTDAFAFDTF" --height=8.494 --vers=256The ratio of the tracker size to full height can be given in
thousandths (permille) using the --vers option (API
option_2). The default value is 250 (25%).
For example the following
produces the same barcode (see 6.5.3 Royal Mail 4-State Customer Code (RM4SCC)) as
6.6 Matrix Symbols
6.6.1 Data Matrix (ISO 16022)
Also known as Semacode this symbology was developed in 1989 by Acuity CiMatrix in partnership with the U.S. DoD and NASA. The symbol can encode a large amount of data in a small area.
zint -b HIBC_DM -d "/ACMRN123456/V200912190833" --fast --squareData Matrix encodes characters in the Latin-1 set by default but also
supports encoding in other character sets using the ECI mechanism. It
can also encode GS1 data. The size of the generated symbol can be
adjusted using the --vers option (API
option_2) as shown in the table below. A separate symbology
ID (BARCODE_HIBC_DM) can be used to encode Health Industry
Barcode (HIBC) data. Note that only ECC 200 symbols are supported, the
older standards (ECC 000 to 140) have now been removed from Zint.
| Input | Symbol Size | Input | Symbol Size | Input | Symbol Size | ||
|---|---|---|---|---|---|---|---|
| 1 | 10 x 10 | 11 | 36 x 36 | 21 | 104 x 104 | ||
| 2 | 12 x 12 | 12 | 40 x 40 | 22 | 120 x 120 | ||
| 3 | 14 x 14 | 13 | 44 x 44 | 23 | 132 x 132 | ||
| 4 | 16 x 16 | 14 | 48 x 48 | 24 | 144 x 144 | ||
| 5 | 18 x 18 | 15 | 52 x 52 | 25 | 8 x 18 | ||
| 6 | 20 x 20 | 16 | 64 x 64 | 26 | 8 x 32 | ||
| 7 | 22 x 22 | 17 | 72 x 72 | 27 | 12 x 26 | ||
| 8 | 24 x 24 | 18 | 80 x 80 | 28 | 12 x 36 | ||
| 9 | 26 x 26 | 19 | 88 x 88 | 29 | 16 x 36 | ||
| 10 | 32 x 32 | 20 | 96 x 96 | 30 | 16 x 48 |
The largest version 24 (144 x 144) can encode 3116 digits, around 2335 alphanumeric characters, or 1555 bytes of data.
When using automatic symbol sizes you can force Zint to use square
symbols (versions 1-24) at the command line by using the option
--square (API option_3 = DM_SQUARE).
Data Matrix Rectangular Extension (ISO/IEC 21471) codes may be generated with the following values as before:
| Input | Symbol Size | Input | Symbol Size | |
|---|---|---|---|---|
| 31 | 8 x 48 | 40 | 20 x 36 | |
| 32 | 8 x 64 | 41 | 20 x 44 | |
| 33 | 8 x 80 | 42 | 20 x 64 | |
| 34 | 8 x 96 | 43 | 22 x 48 | |
| 35 | 8 x 120 | 44 | 24 x 48 | |
| 36 | 8 x 144 | 45 | 24 x 64 | |
| 37 | 12 x 64 | 46 | 26 x 40 | |
| 38 | 12 x 88 | 47 | 26 x 48 | |
| 39 | 16 x 64 | 48 | 26 x 64 |
DMRE symbol sizes may be activated in automatic size mode using the
option --dmre (API option_3 = DM_DMRE).
GS1 data may be encoded using FNC1 (default) or
GS (Group Separator, ASCII 29) as separator. Use the option
--gssep to change to GS (API
output_options |= GS1_GS_SEPARATOR).
By default Zint uses a “de facto” codeword placement for symbols of
size 144 x 144 (version 24). To override this and use the now clarified
ISO/IEC standard placement, use option --dmiso144 (API
option_3 |= DM_ISO_144).
For a faster but less optimal encodation, the --fast
option (API input_mode |= FAST_MODE) may be used.
Data Matrix supports Structured Append of up to 16 symbols and a
numeric ID (file identifications), which can be set by using the
--structapp option (see 4.17
Structured Append) (API structapp). The ID consists of
2 numbers ID1 and ID2, each of which can range
from 1 to 254, and is specified as the single number
ID1 * 1000 + ID2, so for instance ID1
"123" and ID2 "234" would be
given as "123234". Note that both ID1 and
ID2 must be non-zero, so e.g. "123000" or
"000123" would be invalid IDs. If an ID is not given it
defaults to "001001".
6.6.2 Royal Mail 2D Mailmark (CMDM) (Data Matrix)
zint -b MAILMARK_2D -d "JGB 01Z999999900000001EC1A1AA1A0SN35TQ" --vers=30This variant of Data Matrix, also known as “Complex Mail Data Mark” (CMDM), was introduced by Royal Mail along with 6.5.4 Royal Mail 4-State Mailmark, and offers space for customer data following an initial pre-formatted 45 character section, as summarized below.
| Field Name | Length | Values |
|---|---|---|
| UPU Country ID | 4 | "JGB " |
| Information Type | 1 | Alphanumeric |
| Version ID | 1 | "1" |
| Class | 1 | Alphanumeric |
| Supply Chain ID | 7 | Numeric |
| Item ID | 8 | Numeric |
| Destination+DPS | 9 | Alphanumeric (1 of 13 patterns) |
| Service Type | 1 | Numeric |
| RTS Post Code | 7 | Alphanumeric (1 of 7 patterns) |
| Reserved | 6 | Spaces |
| Customer Data | 6, 45 or 29 | Anything (Latin-1) |
The 12 Destination+DPS (Destination Post Code plus Delivery Point
Suffix) patterns are similar to those for the 4-state except that the
alphabetic limitation ('L' versus 'A') does
not apply, only the initial “outward” part is required (the rest can be
blank), and the whole field can be blank:
ANNAANASS | AANNAANAS | ANNNAANAS | AANNNAANA | ANANAANAS | AANANAANA |
ANSSSSSSS | AANSSSSSS | ANNSSSSSS | AANNSSSSS | ANASSSSSS | AANASSSSS |
where 'A' is alphabetic (A-Z), 'N' numeric
(0-9), and 'S' space.
The 6 RTS (Return to Sender) Post Code patterns are similar to above
except without the DPS ('NA'), and the trailing “inward”
part cannot be blank (although the whole field can be):
ANNAASS | AANNAAS | ANNNAAS | AANNNAA | ANANAAS | AANANAA |
Three sizes are defined, one rectangular, with varying maximum amounts of optional customer data:
| Name | Size | Customer Data | Zint Version |
|---|---|---|---|
| Type 7 | 24 x 24 | 6 characters | 8 |
| Type 9 | 32 x 32 | 45 characters | 10 |
| Type 29 | 16 x 48 | 29 characters | 30 |
Zint will automatically select a size based on the amount of customer
data, or it can be specified using the --vers option (API
option_2), which takes the Zint version number (one more
than the Royal Mail Type number). Zint will prefix the input data with
"JGB " if it’s missing, and also space-pad the input if the
customer data is absent or falls short. As with Data Matrix, the
rectangular symbol Type 29 can be excluded from automatic size selection
by using the option --square (API
option_3 = DM_SQUARE).
GS1 data, the ECI mechanism, and Structured Append are not supported.
6.6.3 QR Code (ISO 18004)
Also known as Quick Response Code this symbology was developed by Denso.
zint -b QRCODE -d "QR Code Symbol" --mask=5Four levels of error correction are available using the
--secure option (API option_1) as shown in the
following table.
| Input | ECC Level | Error Correction Capacity | Recovery Capacity |
|---|---|---|---|
| 1 | L | Approx 20% of symbol | Approx 7% |
| 2 | M | Approx 37% of symbol | Approx 15% |
| 3 | Q | Approx 55% of symbol | Approx 25% |
| 4 | H | Approx 65% of symbol | Approx 30% |
The size of the symbol can be specified by setting the
--vers option (API option_2) to the QR Code
version required (1-40). The size of symbol generated is shown in the
table below.
| Input | Symbol Size | Input | Symbol Size | Input | Symbol Size | ||
|---|---|---|---|---|---|---|---|
| 1 | 21 x 21 | 15 | 77 x 77 | 29 | 133 x 133 | ||
| 2 | 25 x 25 | 16 | 81 x 81 | 30 | 137 x 137 | ||
| 3 | 29 x 29 | 17 | 85 x 85 | 31 | 141 x 141 | ||
| 4 | 33 x 33 | 18 | 89 x 89 | 32 | 145 x 145 | ||
| 5 | 37 x 37 | 19 | 93 x 93 | 33 | 149 x 149 | ||
| 6 | 41 x 41 | 20 | 97 x 97 | 34 | 153 x 153 | ||
| 7 | 45 x 45 | 21 | 101 x 101 | 35 | 157 x 157 | ||
| 8 | 49 x 49 | 22 | 105 x 105 | 36 | 161 x 161 | ||
| 9 | 53 x 53 | 23 | 109 x 109 | 37 | 165 x 165 | ||
| 10 | 57 x 57 | 24 | 113 x 113 | 38 | 169 x 169 | ||
| 11 | 61 x 61 | 25 | 117 x 117 | 39 | 173 x 173 | ||
| 12 | 65 x 65 | 26 | 121 x 121 | 40 | 177 x 177 | ||
| 13 | 69 x 69 | 27 | 125 x 125 | ||||
| 14 | 73 x 73 | 28 | 129 x 129 |
The maximum capacity of a QR Code symbol (version 40) 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 by
default encode either characters in the Latin-1 set or Kanji, Katakana
and ASCII characters which are members of the Shift JIS encoding scheme.
In addition QR Code supports other character sets using the ECI
mechanism. Input should usually be entered as UTF-8 with conversion to
Latin-1 or Shift JIS being carried out by Zint. A separate symbology ID
(BARCODE_HIBC_QR) can be used to encode Health Industry
Barcode (HIBC) data.
Non-ASCII data density may be maximized by using the
--fullmultibyte switch (API
option_3 = ZINT_FULL_MULTIBYTE), but check that your
barcode reader supports this before using.
QR Code has eight different masks designed to minimize unwanted
patterns. The best mask to use is selected automatically by Zint but may
be manually specified by using the --mask switch with
values 0-7, or in the API by setting
option_3 = (N + 1) << 8 where N is 0-7. To use with
ZINT_FULL_MULTIBYTE set
The --fast option (API
input_mode |= FAST_MODE) may be used when leaving Zint to
automatically select a mask to reduce the number of masks to try to four
(0, 2, 4, 7).
QR Code supports Structured Append of up to 16 symbols and a numeric
ID (parity), which can be set by using the --structapp
option (see 4.17 Structured Append)
(API structapp). The parity ID ranges from 0 (default) to
255, and for full compliance should be set to the value obtained by
XOR-ing together each byte of the complete data forming the
sequence. Currently this calculation must be done outside of Zint.
6.6.4 Micro QR Code (ISO 18004)
A miniature version of the QR Code symbol for short messages, Micro QR Code symbols can encode either Latin-1 characters or Shift JIS characters. Input should be entered as a UTF-8 stream with conversion to Latin-1 or Shift JIS being carried out automatically by Zint.
zint -b MICROQR -d "01234567"A preferred symbol size can be selected by using the
--vers option (API option_2), as shown in the
table below. Note that versions M1 and M2 have restrictions on what
characters can be encoded.
| Input | Version | Symbol Size | Allowed Characters |
|---|---|---|---|
| 1 | M1 | 11 x 11 | Numeric only |
| 2 | M2 | 13 x 13 | Numeric, uppercase letters, space, and the
characters "$%*+-./:" |
| 3 | M3 | 15 x 15 | Latin-1 and Shift JIS |
| 4 | M4 | 17 x 17 | Latin-1 and Shift JIS |
Version M4 can encode up to 35 digits, 21 alphanumerics, 15 bytes or 9 Kanji characters.
Except for version M1, which is always ECC level L, the amount of ECC
codewords can be adjusted using the --secure option (API
option_1); however ECC level H is not available for any
version, and ECC level Q is only available for version M4:
| Input | ECC Level | Error Correction Capacity | Recovery Capacity | Available for Versions |
|---|---|---|---|---|
| 1 | L | Approx 20% of symbol | Approx 7% | M1, M2, M3, M4 |
| 2 | M | Approx 37% of symbol | Approx 15% | M2, M3, M4 |
| 3 | Q | Approx 55% of symbol | Approx 25% | M4 |
The defaults for symbol size and ECC level depend on the input and whether either of them is specified.
For barcode readers that support it, non-ASCII data density may be
maximized by using the --fullmultibyte switch (API
option_3 = ZINT_FULL_MULTIBYTE).
Micro QR Code has four different masks designed to minimize unwanted
patterns. The best mask to use is selected automatically by Zint but may
be manually specified by using the --mask switch with
values 0-3, or in the API by setting
option_3 = (N + 1) << 8 where N is 0-3. To use with
ZINT_FULL_MULTIBYTE set
6.6.5 Rectangular Micro QR Code (rMQR) (ISO 23941)
A rectangular version of QR Code, rMQR supports encoding of GS1 data, and either Latin-1 characters or Shift JIS characters, and other encodings using the ECI mechanism. As with other symbologies data should be entered as UTF-8 with conversion being handled by Zint.
zint -b RMQR -d "0123456"The amount of ECC codewords can be adjusted using the
--secure option (API option_1), however only
ECC levels M and H are valid for this type of symbol.
| Input | ECC Level | Error Correction Capacity | Recovery Capacity |
|---|---|---|---|
| 2 | M | Approx 37% of symbol | Approx 15% |
| 4 | H | Approx 65% of symbol | Approx 30% |
The preferred symbol sizes can be selected using the
--vers option (API option_2) as shown in the
table below. Input values between 33 and 38 fix the height of the symbol
while allowing Zint to determine the minimum symbol width.
| Input | Version | Symbol Size (HxW) | Input | Version | Symbol Size (HxW) | |
|---|---|---|---|---|---|---|
| 1 | R7x43 | 7 x 43 | 20 | R13x77 | 13 x 77 | |
| 2 | R7x59 | 7 x 59 | 21 | R13x99 | 13 x 99 | |
| 3 | R7x77 | 7 x 77 | 22 | R13x139 | 13 x 139 | |
| 4 | R7x99 | 7 x 99 | 23 | R15x43 | 15 x 43 | |
| 5 | R7x139 | 7 x 139 | 24 | R15x59 | 15 x 59 | |
| 6 | R9x43 | 9 x 43 | 25 | R15x77 | 15 x 77 | |
| 7 | R9x59 | 9 x 59 | 26 | R15x99 | 15 x 99 | |
| 8 | R9x77 | 9 x 77 | 27 | R15x139 | 15 x 139 | |
| 9 | R9x99 | 9 x 99 | 28 | R17x43 | 17 x 43 | |
| 10 | R9x139 | 9 x 139 | 29 | R17x59 | 17 x 59 | |
| 11 | R11x27 | 11 x 27 | 30 | R17x77 | 17 x 77 | |
| 12 | R11x43 | 11 x 43 | 31 | R17x99 | 17 x 99 | |
| 13 | R11x59 | 11 x 59 | 32 | R17x139 | 17 x 139 | |
| 14 | R11x77 | 11 x 77 | 33 | R7xW | 7 x automatic width | |
| 15 | R11x99 | 11 x 99 | 34 | R9xW | 9 x automatic width | |
| 16 | R11x139 | 11 x 139 | 35 | R11xW | 11 x automatic width | |
| 17 | R13x27 | 13 x 27 | 36 | R13xW | 13 x automatic width | |
| 18 | R13x43 | 13 x 43 | 37 | R15xW | 15 x automatic width | |
| 19 | R13x59 | 13 x 59 | 38 | R17xW | 17 x automatic width |
The largest version R17x139 (32) can encode up to 361 digits, 219 alphanumerics, 150 bytes, or 92 Kanji characters.
For barcode readers that support it, non-ASCII data density may be
maximized by using the --fullmultibyte switch or in the API
by setting option_3 = ZINT_FULL_MULTIBYTE.
6.6.6 UPNQR (Univerzalnega Plačilnega Naloga QR)
A variation of QR Code used by Združenje Bank Slovenije (Bank Association of Slovenia). The size, error correction level and ECI are set by Zint and do not need to be specified.
zint -b UPNQR -i upn_utf8.txt --quietzonesUPNQR is unusual in that it uses Latin-2 (ISO/IEC 8859-2 plus ASCII)
formatted data. Zint will accept UTF-8 data and convert it to Latin-2,
or if your data is already Latin-2 formatted use the
--binary switch (API
input_mode = DATA_MODE).
The following example creates a symbol from data saved as a Latin-2 file:
A mask may be manually specified and the --fast option
used as with 6.6.3 QR Code (ISO
18004).
6.6.7 MaxiCode (ISO 16023)
Developed by UPS the MaxiCode symbology employs a grid of hexagons surrounding a bullseye finder pattern. This symbology is designed for the identification of parcels.
zint -b MAXICODE -d "1Z00004951\GUPSN\G06X610\G159\G1234567\G1/1\G\GY\G1 MAIN ST\GNY\GNY\R\E" --esc --primary="152382802000000" --scmvv=96MaxiCode symbols can be encoded in one of five modes. In modes 2 and 3 MaxiCode symbols are composed of two parts named the primary and secondary messages. The primary message consists of a Structured Carrier Message which includes various data about the package being sent and the secondary message usually consists of address data in a data structure. The format of the primary message required by Zint is given in the following table.
| Characters | Meaning |
|---|---|
| 1 - 9 | Postcode data which can consist of up to 9 digits (for mode 2) or up to 6 alphanumeric characters (for mode 3). Remaining unused characters for mode 3 can be filled with the SPACE character (ASCII 32) or omitted. (adjust the following character positions according to postcode length) |
| 10 - 12 | Three-digit country code according to ISO 3166-1. |
| 13 - 15 | Three-digit service code. This depends on your parcel courier. |
The primary message can be set at the command prompt using the
--primary switch (API primary). The secondary
message uses the normal data entry method. For example:
When using the API the primary message must be placed in the
primary string. The secondary is entered in the same way as
described in 5.2 Encoding and
Saving to File. When either of these modes is selected Zint will
analyse the primary message and select either mode 2 or mode 3 as
appropriate.
As a convenience the secondary message for modes 2 and 3 can be set
to be prefixed by the ISO/IEC 15434 Format "01"
(transportation) sequence "[)>\R01\Gvv", where
vv is a 2-digit version, by using the --scmvv
switch (API option_2 = vv + 1). For example to use the
common version "96" (ASC MH10/SC 8):
zint -b MAXICODE --primary="152382802840001" --scmvv=96 --esc -d \
"1Z00004951\GUPSN\G06X610\G159\G1234567\G1/1\G\GY\G1 MAIN ST\GNY\GNY\R\E"will prefix "[)>\R01\G96" to the secondary message.
(\R, \G and \E are the escape
sequences for Record Separator, Group Separator and End of Transmission
respectively - see Table 2: Escape
Sequences.)
Modes 4 to 6 can be accessed using the --mode switch
(API option_1). Modes 4 to 6 do not have a primary message.
For example:
Mode 6 is reserved for the maintenance of scanner hardware and should not be used to encode user data.
This symbology uses Latin-1 character encoding by default but also supports the ECI encoding mechanism. The maximum length of text which can be placed in a MaxiCode symbol depends on the type of characters used in the text.
Example maximum data lengths are given in the table below:
| Mode | Maximum Data Length for Capital Letters | Maximum Data Length for Numeric Digits | Number of Error Correction Codewords |
|---|---|---|---|
2* | 84 | 126 | 50 |
3* | 84 | 126 | 50 |
| 4 | 93 | 138 | 50 |
| 5 | 77 | 113 | 66 |
| 6 | 93 | 138 | 50 |
* - secondary only
MaxiCode supports Structured Append of up to 8 symbols, which can be
set by using the --structapp option (see 4.17 Structured Append) (API
structapp). It does not support specifying an ID.
MaxiCode uses a different scaling than other symbols for raster output, see 4.9.3 MaxiCode Raster Scaling, and also for EMF vector output, when the scale is multiplied by 20 instead of 2.
6.6.8 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 square bullseye finder pattern.
zint -b AZTEC -d "123456789012"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, mutually exclusive, are available to change this behaviour:
- The size of the symbol can be specified using the
--versoption (APIoption_2) 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 bullseye pattern at the centre of the symbol.
| Input | Symbol Size | Input | Symbol Size | Input | Symbol Size | ||
|---|---|---|---|---|---|---|---|
| 1 | 15 x 15* | 13 | 53 x 53 | 25 | 105 x 105 | ||
| 2 | 19 x 19* | 14 | 57 x 57 | 26 | 109 x 109 | ||
| 3 | 23 x 23* | 15 | 61 x 61 | 27 | 113 x 113 | ||
| 4 | 27 x 27* | 16 | 67 x 67 | 28 | 117 x 117 | ||
| 5 | 19 x 19 | 17 | 71 x 71 | 29 | 121 x 121 | ||
| 6 | 23 x 23 | 18 | 75 x 75 | 30 | 125 x 125 | ||
| 7 | 27 x 27 | 19 | 79 x 79 | 31 | 131 x 131 | ||
| 8 | 31 x 31 | 20 | 83 x 83 | 32 | 135 x 135 | ||
| 9 | 37 x 37 | 21 | 87 x 87 | 33 | 139 x 139 | ||
| 10 | 41 x 41 | 22 | 91 x 91 | 34 | 143 x 143 | ||
| 11 | 45 x 45 | 23 | 95 x 95 | 35 | 147 x 147 | ||
| 12 | 49 x 49 | 24 | 101 x 101 | 36 | 151 x 151 |
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 (the absolute minimum, not recommended, and anything less than 5% + 3 codewords will result in a warning).
- Alternatively the amount of error correction data can be specified
by setting the
--secureoption (APIoption_1) to a value from the following table.
| Mode | Error Correction Capacity |
|---|---|
| 1 | >=10% + 3 codewords |
| 2 | >=23% + 3 codewords |
| 3 | >=36% + 3 codewords |
| 4 | >=50% + 3 codewords |
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.
Compact symbols can be excluded from consideration on automatic
sizing by specifying --azfull (API
symbol->option_3 = ZINT_AZTEC_FULL).
Aztec Code supports ECI encoding and can encode up to a maximum
length of approximately 3823 numeric or 3067 alphabetic characters or
1914 bytes of data. A separate symbology ID
(BARCODE_HIBC_AZTEC) can be used to encode Health Industry
Barcode (HIBC) data.
For a faster but less optimal encodation, the --fast
option (API input_mode |= FAST_MODE) may be used.
Aztec Code supports Structured Append of up to 26 symbols and an
optional alphanumeric ID of up to 32 characters, which can be set by
using the --structapp option (see 4.17 Structured Append) (API
structapp). The ID cannot contain spaces. If an ID is not
given, no ID is encoded.
6.6.9 Aztec Runes (ISO 24778)
A truncated version of compact Aztec Code for encoding whole integers between 0 and 255, as defined in ISO/IEC 24778 Annex A. Includes Reed-Solomon error correction. It does not support Structured Append.
zint -b AZRUNE -d "125"6.6.10 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, and also supports the ECI mechanism.
zint -b CODEONE -d "1234567890123456789012"There are two types of Code One symbol - fixed-ratio symbols which
are roughly square (versions A through to H) and variable-width versions
(versions S and T). These can be selected by using --vers
(API option_2) as shown in the table below:
| Input | Version | Size (H x W) | Numeric Data Capacity | Alphanumeric Data Capacity |
|---|---|---|---|---|
| 1 | A | 16 x 18 | 22 | 13 |
| 2 | B | 22 x 22 | 44 | 27 |
| 3 | C | 28 x 32 | 104 | 64 |
| 4 | D | 40 x 42 | 217 | 135 |
| 5 | E | 52 x 54 | 435 | 271 |
| 6 | F | 70 x 76 | 886 | 553 |
| 7 | G | 104 x 98 | 1755 | 1096 |
| 8 | H | 148 x 134 | 3550 | 2218 |
| 9 | S | 8 x automatic width | 18 | N/A |
| 10 | T | 16 x automatic width | 90 | 55 |
Version S symbols can only encode numeric data. The width of version S and version T symbols is determined by the length of the input data.
Code One supports Structured Append of up to 128 symbols, which can
be set by using the --structapp option (see 4.17 Structured Append) (API
structapp). It does not support specifying an ID.
Structured Append is not supported with GS1 data nor for Version S
symbols.
6.6.11 Grid Matrix
Grid Matrix groups modules in a chequerboard pattern, and by default supports the GB 2312 standard set, which includes Hanzi, ASCII and a small number of ISO/IEC 8859-1 characters. Input should be entered as UTF-8 with conversion to GB 2312 being carried out automatically by Zint. Up to around 1529 alphanumeric characters or 2751 digits may be encoded. The symbology also supports the ECI mechanism. Support for GS1 data has not yet been implemented.
zint -b GRIDMATRIX --eci=29 -d "AAT2556 电池充电器+降压转换器 200mA至2A tel:86 019 82512738"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 --vers option (API
option_2), and the error correction capacity can be
specified by using the --secure option (API
option_1), according to the following tables.
| Input | Symbol Size | Input | Symbol Size | |
|---|---|---|---|---|
| 1 | 18 x 18 | 8 | 102 x 102 | |
| 2 | 30 x 30 | 9 | 114 x 114 | |
| 3 | 42 x 42 | 10 | 126 x 126 | |
| 4 | 54 x 54 | 11 | 138 x 138 | |
| 5 | 66 x 66 | 12 | 150 x 150 | |
| 6 | 78 x 78 | 13 | 162 x 162 | |
| 7 | 90 x 90 |
| Mode | Error Correction Capacity |
|---|---|
| 1 | Approximately 10% |
| 2 | Approximately 20% |
| 3 | Approximately 30% |
| 4 | Approximately 40% |
| 5 | Approximately 50% |
Non-ASCII data density may be maximized by using the
--fullmultibyte switch (API
option_3 = ZINT_FULL_MULTIBYTE), but check that your
barcode reader supports this before using.
Grid Matrix supports Structured Append of up to 16 symbols and a
numeric ID (file signature), which can be set by using the
--structapp option (see 4.17
Structured Append) (API structapp). The ID ranges from
0 (default) to 255.
6.6.12 DotCode
DotCode uses a grid of dots in a rectangular formation to encode
characters up to a maximum of approximately 1220 characters (or 2940
numeric digits). The symbology supports ECI encoding and GS1 data
encoding. By default Zint will produce a symbol which is approximately
square, however the width of the symbol can be adjusted by using the
--cols option (API option_2) (maximum 200).
Outputting DotCode to raster images (BMP, GIF, PCX, PNG, TIF) will
require setting the scale of the image to a larger value than the
default (e.g. approximately 10) for the dots to be plotted correctly.
Approximately 33% of the resulting symbol is comprised of error
correction codewords.
zint -b DOTCODE -d "[01]00012345678905[17]201231[10]ABC123456" --gs1DotCode has two sets of 4 masks, designated 0-3 and 0’-3’, the second
"prime" set being the same as the first with corners lit.
The best mask to use is selected automatically by Zint but may be
manually specified by using the --mask switch with values
0-7, where 4-7 denote 0’-3’, or in the API by setting
option_3 = (N + 1) << 8 where N is 0-7.
DotCode supports Structured Append of up to 35 symbols, which can be
set by using the --structapp option (see 4.17 Structured Append) (API
structapp). It does not support specifying an ID.
6.6.13 Han Xin Code (ISO 20830)
Also known as Chinese Sensible Code, Han Xin is capable of encoding characters in either the Latin-1 character set or the GB 18030 character set (which is a UTF, i.e. includes all Unicode characters, optimized for Chinese characters) and is also able to support the ECI mechanism. Support for the encoding of GS1 data has not yet been implemented.
zint -b HANXIN -d "Hanxin Code symbol"The size of the symbol can be specified using the --vers
option (API option_2) to a value between 1 and 84 according
to the following table.
| Input | Symbol Size | Input | Symbol Size | Input | Symbol Size | ||
|---|---|---|---|---|---|---|---|
| 1 | 23 x 23 | 29 | 79 x 79 | 57 | 135 x 135 | ||
| 2 | 25 x 25 | 30 | 81 x 81 | 58 | 137 x 137 | ||
| 3 | 27 x 27 | 31 | 83 x 83 | 59 | 139 x 139 | ||
| 4 | 29 x 29 | 32 | 85 x 85 | 60 | 141 x 141 | ||
| 5 | 31 x 31 | 33 | 87 x 87 | 61 | 143 x 143 | ||
| 6 | 33 x 33 | 34 | 89 x 89 | 62 | 145 x 145 | ||
| 7 | 35 x 35 | 35 | 91 x 91 | 63 | 147 x 147 | ||
| 8 | 37 x 37 | 36 | 93 x 93 | 64 | 149 x 149 | ||
| 9 | 39 x 39 | 37 | 95 x 95 | 65 | 151 x 151 | ||
| 10 | 41 x 41 | 38 | 97 x 97 | 66 | 153 x 153 | ||
| 11 | 43 x 43 | 39 | 99 x 99 | 67 | 155 x 155 | ||
| 12 | 45 x 45 | 40 | 101 x 101 | 68 | 157 x 157 | ||
| 13 | 47 x 47 | 41 | 103 x 103 | 69 | 159 x 159 | ||
| 14 | 49 x 49 | 42 | 105 x 105 | 70 | 161 x 161 | ||
| 15 | 51 x 51 | 43 | 107 x 107 | 71 | 163 x 163 | ||
| 16 | 53 x 53 | 44 | 109 x 109 | 72 | 165 x 165 | ||
| 17 | 55 x 55 | 45 | 111 x 111 | 73 | 167 x 167 | ||
| 18 | 57 x 57 | 46 | 113 x 113 | 74 | 169 x 169 | ||
| 19 | 59 x 59 | 47 | 115 x 115 | 75 | 171 x 171 | ||
| 20 | 61 x 61 | 48 | 117 x 117 | 76 | 173 x 173 | ||
| 21 | 63 x 63 | 49 | 119 x 119 | 77 | 175 x 175 | ||
| 22 | 65 x 65 | 50 | 121 x 121 | 78 | 177 x 177 | ||
| 23 | 67 x 67 | 51 | 123 x 123 | 79 | 179 x 179 | ||
| 24 | 69 x 69 | 52 | 125 x 125 | 80 | 181 x 181 | ||
| 25 | 71 x 71 | 53 | 127 x 127 | 81 | 183 x 183 | ||
| 26 | 73 x 73 | 54 | 129 x 129 | 82 | 185 x 185 | ||
| 27 | 75 x 75 | 55 | 131 x 131 | 83 | 187 x 187 | ||
| 28 | 77 x 77 | 56 | 133 x 133 | 84 | 189 x 189 |
The largest version (84) can encode 7827 digits, 4350 ASCII characters, up to 2175 Chinese characters, or 3261 bytes, making it the most capacious of all the barcodes supported by Zint.
There are four levels of error correction capacity available for Han
Xin Code which can be set by using the --secure option (API
option_1) to a value from the following table.
| Mode | Recovery Capacity |
|---|---|
| 1 | Approx 8% |
| 2 | Approx 15% |
| 3 | Approx 23% |
| 4 | Approx 30% |
Non-ASCII data density may be maximized by using the
--fullmultibyte switch (API
option_3 = ZINT_FULL_MULTIBYTE), but check that your
barcode reader supports this before using.
Han Xin has four different masks designed to minimize unwanted
patterns. The best mask to use is selected automatically by Zint but may
be manually specified by using the --mask switch with
values 0-3, or in the API by setting
option_3 = (N + 1) << 8 where N is 0-3. To use with
ZINT_FULL_MULTIBYTE set
6.6.14 Ultracode
This symbology uses a grid of coloured elements to encode data. ECI and GS1 modes are supported.
zint -b ULTRA -d "HEIMASÍÐA KENNARAHÁSKÓLA ÍSLANDS"The amount of error correction can be set using the
--secure option (API option_1) to a value as
shown in the following table.
| Value | EC Level | Amount of symbol holding error correction data |
|---|---|---|
| 1 | EC0 | 0% - Error detection only |
| 2 | EC1 | Approx 5% |
| 3 | EC2 | Approx 9% - Default value |
| 4 | EC3 | Approx 17% |
| 5 | EC4 | Approx 25% |
| 6 | EC5 | Approx 33% |
Zint does not currently implement data compression by default, but this can be initiated through the API by setting
With compression, up to 504 digits, 375 alphanumerics or 252 bytes can be encoded.
Revision 2 of Ultracode (2023) may be specified using
--vers=2 (API option_2 = 2).
WARNING: Revision 2 of Ultracode was finalized December 2023 and Zint has not yet been updated to support it. Do not use.
Ultracode supports Structured Append of up to 8 symbols and an
optional numeric ID (File Number), which can be set by using the
--structapp option (see 4.17
Structured Append) (API structapp). The ID ranges from
1 to 80088. If an ID is not given, no ID is encoded.
6.7 Other Barcode-Like Markings
6.7.1 Facing Identification Mark (FIM)
Used by the United States Postal Service (USPS), the FIM symbology is used to assist automated mail processing.
zint -b FIM --compliantheight -d "C"There are only 5 valid symbols which can be generated using the characters A-E as shown in the table below.
| Code Letter | Usage |
|---|---|
| A | Used for courtesy reply mail and metered reply mail with a |
| pre-printed POSTNET symbol. | |
| B | Used for business reply mail without a pre-printed zip code. |
| C | Used for business reply mail with a pre-printed zip code. |
| D | Used for Information Based Indicia (IBI) postage. |
| E | Used for customized mail with a USPS Intelligent Mail barcode. |
6.7.2 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 numeric data up to a maximum of 128 digits and does not include a check digit.
zint -b FLAT -d "1304056"