diff --git a/docs/Makefile b/docs/Makefile
index 304a5099..a01cc2d5 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -9,6 +9,7 @@ SOURCE = manual.pmd
OUT_PDF = manual.pdf
OUT_TXT = manual.txt
OUT_HTML = manual.html
+HIGHLIGHT_THEME = haddock.theme
INC_HEADER_PDF = inc_header_pdf.tex
INC_BEFORE_BODY_PDF = inc_before_body_pdf.tex
INC_PDF = --include-in-header $(INC_HEADER_PDF) --include-before-body $(INC_BEFORE_BODY_PDF)
@@ -17,7 +18,7 @@ INC_TXT = --include-in-header $(INCLUDES_TXT)
SOURCE_MAN_PAGE = zint.1.pmd
OUT_MAN_PAGE = zint.1
LUA_FILTER = lua-crossrefs/lua-crossrefs.lua
-INFRASTRUCTURE = Makefile $(LUA_FILTER)
+INFRASTRUCTURE = Makefile $(LUA_FILTER) $(HIGHLIGHT_THEME)
IMAGES = \
images/zint.png \
images/zint-qt.png \
@@ -152,7 +153,7 @@ MONO_FONT = monofont="Liberation Mono"
CJK_FONT = CJKmainfont="WenQuanYi Micro Hei Mono"
PDF_OPTS = --pdf-engine=xelatex \
--lua-filter=$(LUA_FILTER) \
- --syntax-highlighting=haddock -V colorlinks -V geometry:margin=20mm -V papersize=a4 \
+ --syntax-highlighting=$(HIGHLIGHT_THEME) -V colorlinks -V geometry:margin=20mm -V papersize=a4 \
-V csquotes=true --dpi=300
TEX_MAN_PAGE = zint.1.tex
TXT_OPTS = --lua-filter=$(LUA_FILTER) \
@@ -210,7 +211,7 @@ manual.tex : $(SOURCE) $(SOURCE_MAN_PAGE) $(INC_HEADER_PDF) $(INC_BEFORE_BODY_PD
# HTML one-page (uses modified "templates/styles.html", unchanged "templates/default.html")
HTML_OPTS = --lua-filter=$(LUA_FILTER) \
- --syntax-highlighting=haddock \
+ --syntax-highlighting=$(HIGHLIGHT_THEME) \
--template=templates/default.html --eol=lf -s -t html
INC_BEFORE_BODY_HTML = inc_before_body_html.html
INC_HTML = --include-before-body $(INC_BEFORE_BODY_HTML)
diff --git a/docs/haddock.theme b/docs/haddock.theme
new file mode 100644
index 00000000..fa345b92
--- /dev/null
+++ b/docs/haddock.theme
@@ -0,0 +1,197 @@
+{
+ "text-color": "#351c35",
+ "background-color": "#fafafe",
+ "line-number-color": "#aaaaaa",
+ "line-number-background-color": null,
+ "text-styles": {
+ "Alert": {
+ "text-color": "#ff0000",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Annotation": {
+ "text-color": "#008000",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Attribute": {
+ "text-color": null,
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "BuiltIn": {
+ "text-color": null,
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Char": {
+ "text-color": "#008080",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Comment": {
+ "text-color": "#0047AB",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "CommentVar": {
+ "text-color": "#008000",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Constant": {
+ "text-color": null,
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "ControlFlow": {
+ "text-color": "#A52A2A",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "DataType": {
+ "text-color": "#2E8B57",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "DecVal": {
+ "text-color": "#DC143C",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Documentation": {
+ "text-color": "#008000",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Error": {
+ "text-color": "#ff0000",
+ "background-color": null,
+ "bold": true,
+ "italic": false,
+ "underline": false
+ },
+ "Extension": {
+ "text-color": null,
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Float": {
+ "text-color": "#DC143C",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Import": {
+ "text-color": "#DC143C",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Information": {
+ "text-color": "#008000",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Keyword": {
+ "text-color": "#2E8B57",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Operator": {
+ "text-color": null,
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Other": {
+ "text-color": "#ff4000",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Preprocessor": {
+ "text-color": null,
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "SpecialChar": {
+ "text-color": "#DC143C",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "SpecialString": {
+ "text-color": "#008080",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "String": {
+ "text-color": "#DC143C",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Variable": {
+ "text-color": null,
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "VerbatimString": {
+ "text-color": "#008080",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Warning": {
+ "text-color": "#008000",
+ "background-color": null,
+ "bold": true,
+ "italic": false,
+ "underline": false
+ }
+ }
+}
diff --git a/docs/inc_header_pdf.tex b/docs/inc_header_pdf.tex
index da24ecaa..edd00c3e 100644
--- a/docs/inc_header_pdf.tex
+++ b/docs/inc_header_pdf.tex
@@ -18,18 +18,16 @@
\ifx\tmp\@nnil\originalitem\else\originalitem[#1]\hfill\par\fi}
\makeatother
-%% Text and background color for inline code
+%% Use the wonderful `tcolorbox` instead of `framed` for fenced code blocks
+\usepackage{tcolorbox}
+\tcbuselibrary{breakable}
+\renewenvironment{Shaded}{\begin{tcolorbox}[colframe=white,boxrule=0pt,boxsep=0.5mm,top=0mm,bottom=0mm,colback=shadecolor,breakable=true]}{\end{tcolorbox}}
+
+%% Text color for inline code
\usepackage{xcolor}
-\definecolor{icfg}{HTML}{331a33}
+\definecolor{icfg}{HTML}{351c35} % "text-color" in modified "haddock.theme"
\let\oldtexttt\texttt
\renewcommand{\texttt}[1]{\textcolor{icfg}{\oldtexttt{#1}}}
-%% Unfortunately this messes up wrapping TODO: fix
-%% Background color for inline code https://tex.stackexchange.com/a/507116
-%\definecolor{icbg}{HTML}{fafafa} % Same as modified pygments.theme
-%\newcommand{\code}[1]{%
- %\begingroup\setlength{\fboxsep}{1pt}
- %\colorbox{icbg}{\oldtexttt{\hspace*{0.1pt}\vphantom{A}#1\hspace*{0.1pt}}}\endgroup}
-%\renewcommand{\texttt}[1]{\textcolor{icfg}{\code{\oldtexttt{#1}}}}
%% Make level-4 headings standalone (not run-in) - for some reason "-V block-headings" doesn't seem to work, so do
%% what it does manually here
@@ -39,5 +37,9 @@
%% PDF metadata - the values are set in "docs/inc_before_body_pdf.tex" (otherwise may get overridden)
\usepackage{hyperref}
-%% pandoc-lua-crossrefs: required package
+%% Reduce gap after figures
\usepackage{caption}
+\captionsetup[figure]{belowskip=-6pt}
+
+%% Make footnotes go to bottom of page
+\usepackage[bottom]{footmisc}
diff --git a/docs/lua-crossrefs/.luacheckrc b/docs/lua-crossrefs/.luacheckrc
new file mode 100644
index 00000000..a71e1756
--- /dev/null
+++ b/docs/lua-crossrefs/.luacheckrc
@@ -0,0 +1,13 @@
+stds.pandoc = {
+ read_globals = {
+ 'FORMAT',
+ 'pandoc',
+ 'PANDOC_VERSION',
+ },
+
+ globals = {
+ 'Pandoc',
+ },
+}
+
+std = 'lua54+pandoc'
diff --git a/docs/lua-crossrefs/lua-crossrefs.lua b/docs/lua-crossrefs/lua-crossrefs.lua
index c5a23e0a..2fe6174e 100644
--- a/docs/lua-crossrefs/lua-crossrefs.lua
+++ b/docs/lua-crossrefs/lua-crossrefs.lua
@@ -5,12 +5,14 @@
-- © 2025 R. N. West. Released under the GPL version 2 or greater.
-- SPDX-License-Identifier: GPL-2.0-or-later
+PANDOC_VERSION:must_be_at_least '3.8.2'
+
-- Hacked from "pandoc-lua-crossrefs/init.lua"
-- Table of Ids and corresponding cross-referenceable elements. To be populated
-- by various element numbering functions.
---@type table"Menu" button, along with
"CLI Equivalent...", "Save As...",
-"Factory Reset...", "Help",
+"Factory Reset...", "Help (online)",
"About..." and "Quit" options. Most of the
options are also available in a context menu by right-clicking the
preview.
-
-In the middle of the Data tab is an area for creating composite -symbologies which appears when the currently selected symbology is -supported by the GS1 Composite symbology standard. GS1 data can then be -entered with square brackets used to separate Application Identifier -(AI) information from data as shown here. For details, see 6.3 GS1 Composite Symbols (ISO -24723).
+symbologies which appears when the currently selected symbology supports +the GS1 Composite symbology standard. GS1 data can then be entered with +square brackets used to separate Application Identifier (AI) information +from data as shown here. Round brackets (parentheses) can be used +instead if the"GS1 ()" checkbox is set. For details, see
+6.3 GS1 Composite Symbols
+(ISO 24723).
-For symbologies that support ECIs (Extended Channel Interpretations) the middle of the Data tab is an area for entering additional data @@ -1091,9 +1093,9 @@ href="#multiple-segments">4.16 Multiple Segments for details.
Groupbox
-Many symbologies have extra options to change the content, format and appearance of the symbol generated. For those with few additional @@ -1106,10 +1108,9 @@ Interleaved Code 2 of 5 (ISO 16390)).
ECIs) have a second Symbology-specific tab, shown next.
-
+A second tab appears for those symbologies with more than a few extra options.
@@ -1121,11 +1122,10 @@ Modes), and set it as part of a Structured Append sequence of symbols (see 4.17 Structured Append).
-
+The Appearance tab can be used to adjust the dimensions and other properties of the symbol.
@@ -1170,10 +1170,12 @@ picker tool long narrow column on the right, must be adjusted.) The color picker only deals in RGB(A), and will overwrite any CMYK values with RGB(A) values once"OK" is selected.
-Back in the Appearance tab, the colours can be reset to
-black-on-white using the "Reset" button, and exchanged one
-for the other using the swap
button next to it.
Referring back to Figure 7: Appearance
+Tab, the colours can be reset to black-on-white using the
+"Reset" button, and exchanged one for the other using the
+swap
button
+next to it.
"Data to Encode" text box in the Data tab opens a larger
window which can be used to enter longer strings of text. You can also
use this window to load data from a file.
-The dialog is also available for additional ECI/Data segments by +
The dialog is also available for additional ECI/Data segments (Figure 4: Encoding multiple segments) by clicking the ellipsis button to the right of their data text boxes.
Note that if your data contains line feeds (LF) then the
data will be split into separate lines in the dialog box. On saving the
@@ -1258,12 +1262,14 @@ from the main window.
-The CLI Equivalent Dialog can be invoked from the main menu or the
-context menu and displays the CLI command that will reproduce the
+context menu (Figure 2: Main menu (left) and context menu
+(right)) and displays the CLI command that will reproduce the
barcode as currently configured in the GUI. Press the
"Copy" button to copy the command to the clipboard, which
can then be pasted into the command line.
The symbol can be rotated through four orientations using the
+--rotate option followed by the angle of rotation, valid
+values being 0 (the default), 90, 180 and 270.
zint -d "This Text" --rotate=90The symbol can be rotated through four orientations using the
---rotate option followed by the angle of rotation, valid
-values being 0 (the default), 90, 180 and 270.
The size of the image can be altered using the --scale
@@ -2611,29 +2617,25 @@ character set, you may encode it using an ECI-aware symbology and an ECI
value from Table 8: ECI Codes below. The ECI
information is added to your code symbol as prefix data. The symbologies
-that support ECI are
| Aztec Code | -Grid Matrix | -PDF417 | -|||
| Code One | -Han Xin Code | -QR Code | -|||
| Data Matrix | +Grid Matrix | MaxiCode | +PDF417 | rMQR | |
| Code One | DotCode | +Han Xin Code | MicroPDF417 | +QR Code | Ultracode |
For instance
zint -b EAN13 --batch -i ean13nos.txt -o file~~~.svgzint -b EAN13 --batch -i ean13nos.txt -o "file~~~.svg"
The following table shows some examples to clarify this method:
-o file~~~.svg |
+-o "file~~~.svg" |
"file001.svg",
"file002.svg", "file003.svg" |
|
-o @@@@bar.png |
+-o "@@@@bar.png" |
"***1.png",
"***2.png", "***3.png" (except Windows) |
|
-o @@@@bar.png |
+-o "@@@@bar.png" |
"+++1.png",
"+++2.png", "+++3.png" (on Windows) |
|
-o my~~~bar.eps |
-"my001bar.eps",
-"my002bar.eps", "my003bar.eps" |
+-o "my~~bar~.eps" |
+"my00bar1.eps",
+"my00bar2.eps", "my00bar3.eps" |
-o t#es~t~.png |
-"t es0t1.png",
-"t es0t2.png", "t es0t3.png" |
+-o "t###est.png" |
+"t 1est.png",
+"t 2est.png", "t 3est.png" |
-o dir~/file~~~.svg-o "dir~/file~~~.svg""dir0/file001.svg",
"dir0/file002.svg", …--direct option with a
--filetype option followed by the suffix of the file type
required. For example:
zint -b 84 --direct --filetype=pcx -d "Data to encode"zint -b MICROPDF417 --direct --filetype=pcx -d "Data to encode"
This command will output the symbol as a PCX file to stdout. For the
supported output file formats see Table 3: Output File
@@ -3256,23 +3258,22 @@ method shown in the example below, where render_rgb() and
RGB and RGBA pixel on the screen implemented by the client
application:
int row, col, i = 0, j = 0;
-int red, blue, green, alpha;
-
-for (row = 0; row < my_symbol->bitmap_height; row++) {
- for (col = 0; col < my_symbol->bitmap_width; col++) {
- red = (int) my_symbol->bitmap[i];
- green = (int) my_symbol->bitmap[i + 1];
- blue = (int) my_symbol->bitmap[i + 2];
- if (my_symbol->alphamap) {
- alpha = (int) my_symbol->alphamap[j];
- render_rgba(row, col, red, green, blue, alpha);
- j++;
- } else {
- render_rgb(row, col, red, green, blue);
- }
- i += 3;
- }
-}Where speed is important, the buffer can be returned instead in a
more compact intermediate form using the output option
OUT_BUFFER_INTERMEDIATE. Here each byte is an ASCII value:
@@ -3864,14 +3865,12 @@ class="cross-ref-group">Table 4: Barcode Types (Symbologies). For
example
symbol->symbology = BARCODE_LOGMARS;means the same as
-symbol->symbology = 50;The output_options member can be used to adjust various
aspects of the output file. To select more than one option from the
table below simply OR them together when adjusting this
value:
my_symbol->output_options |= BARCODE_BIND | READER_INIT;my_symbol->output_options |= BARCODE_BIND | READER_INIT;The way in which the input data is encoded can be set using the
-input_mode member. Valid values are shown in the table
-below.
input_mode member:
For example:
-unsigned int cap;
-cap = ZBarcode_Cap(BARCODE_PDF417, ZINT_CAP_HRT | ZINT_CAP_ECI);
-if (cap & ZINT_CAP_HRT) {
- printf("PDF417 supports HRT\n");
-} else {
- printf("PDF417 does not support HRT\n");
-}
-if (cap & ZINT_CAP_ECI) {
- printf("PDF417 supports ECI\n");
-} else {
- printf("PDF417 does not support ECI\n");
-}unsigned int cap;
+cap = ZBarcode_Cap(BARCODE_PDF417, ZINT_CAP_HRT | ZINT_CAP_ECI);
+if (cap & ZINT_CAP_HRT) {
+ printf("PDF417 supports HRT\n");
+} else {
+ printf("PDF417 does not support HRT\n");
+}
+if (cap & ZINT_CAP_ECI) {
+ printf("PDF417 supports ECI\n");
+} else {
+ printf("PDF417 does not support ECI\n");
+}On successful encodation (after using ZBarcode_Encode()
etc.) the option_1, option_2 and
@@ -4392,11 +4390,11 @@ exposed in two helper functions (compatible with the
role="doc-noteref">18 functions
zueci_utf8_to_eci() and
zueci_dest_len_eci()):
int ZBarcode_UTF8_To_ECI(int eci, const unsigned char *source, int length,
- unsigned char dest[], int *p_dest_length);
-
-int ZBarcode_Dest_Len_ECI(int eci, const unsigned char *source, int length,
- int *p_dest_length);int ZBarcode_UTF8_To_ECI(int eci, const unsigned char *source, int length,
+ unsigned char dest[], int *p_dest_length);
+
+int ZBarcode_Dest_Len_ECI(int eci, const unsigned char *source, int length,
+ int *p_dest_length);Call ZBarcode_Dest_Len_ECI() to get the size of buffer
sufficient to accommodate the conversion, then call
ZBarcode_UTF8_To_ECI() with an appropriately sized buffer
@@ -4406,18 +4404,19 @@ to do the conversion. The final destination length, returned in
less, source must be NUL-terminated. The destination buffer
is not NUL-terminated. The obsolete ECIs 0, 1 and 2 are supported.
Whether the Zint library linked to was built without PNG support may -be determined with:
-int ZBarcode_NoPng();Whether the Zint library was built without PNG +support may be determined with:
+int ZBarcode_NoPng(void);which returns 1 if PNG support is not available, else zero.
-Similarly, but with opposite sense, whether the Zint library linked -to was built with GS1 Syntax Engine support may be determined with:
-int ZBarcode_HaveGS1SyntaxEngine();Similarly, but with opposite sense, whether the Zint library was +built with GS1 Syntax Engine support may be determined +with:
+int ZBarcode_HaveGS1SyntaxEngine(void);which returns 1 if GS1 Syntax Engine support is available, else zero.
Lastly, the version of the Zint library linked to is returned by:
-int ZBarcode_Version();int ZBarcode_Version(void);The version parts are separated by hundreds. For instance, version
"2.9.1" is returned as "20901".
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"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. 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).
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).
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.
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"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. 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).
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).
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"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. No check digit is added by default, but can be set -the same as for 6.1.2.1 Standard Code 2 -of 5.
+No check digit is added by default, but can be set the same as for 6.1.2.1 Standard 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"Industrial Code 2 of 5 can encode numeric input (digits 0-9) up to a -maximum of 79 digits. No check digit is added by default, but can be set -the same as for 6.1.2.1 Standard Code 2 -of 5.
+No check digit is added by default, but can be set the same as for 6.1.2.1 Standard Code 2 of 5.
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"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. No check digit is added by default, but can be -set the same as for 6.1.2.1 Standard -Code 2 of 5.
+No check digit is added by default, but can be set the same as for 6.1.2.1 Standard Code 2 of 5.
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"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. Check digit -options are the same as for 6.1.2.1 -Standard Code 2 of 5.
+No check digit is added by default, but can be set the same as for 6.1.2.1 Standard Code 2 of 5.
zint -b ITF14 --compliantheight -d "9212320967145"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
@@ -4534,37 +4534,37 @@ alt="zint -b ITF14 --box --compliantheight -d "9212320967145"" />
zint -b ITF14 --box --compliantheight -d "9212320967145"
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"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.
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"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.
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 "72527270270"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.
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 @@ -4575,14 +4575,14 @@ zero-filled.
data separated from the main data by a+ character or a
space. For example, to draw a UPC-A symbol with the data “72527270270”
and 5-digit add-on data “12345” use the command:
-zint -b UPCA -d "72527270270+12345"zint -b UPCA -d "72527270270+12345"or using the API:
-my_symbol->symbology = BARCODE_UPCA;
-/* Using '+' */
-error = ZBarcode_Encode_and_Print(my_symbol, "72527270270+12345", 0, 0);
-/* Or a space */
-error = ZBarcode_Encode_and_Print(my_symbol, "72527270270 12345", 0, 0);my_symbol->symbology = BARCODE_UPCA;
+/* Using '+' */
+error = ZBarcode_Encode_and_Print(my_symbol, "72527270270+12345", 0, 0);
+/* Or a space */
+error = ZBarcode_Encode_and_Print(my_symbol, "72527270270 12345", 0, 0);--guardwhitespace (API
output_options |= EANUPC_GUARD_WHITESPACE). For UPC, this
is only relevant when there is an add-on:
-zint -b UPCA -d "72527270270+12345" --guardwhitespacezint -b UPCA -d "72527270270+12345" --guardwhitespaceor using the API:
-my_symbol->symbology = BARCODE_UPCA;
-my_symbol->output_options |= EANUPC_GUARD_WHITESPACE;
-error = ZBarcode_Encode_and_Print(my_symbol, "72527270270+12345", 0, 0);my_symbol->symbology = BARCODE_UPCA;
+my_symbol->output_options |= EANUPC_GUARD_WHITESPACE;
+error = ZBarcode_Encode_and_Print(my_symbol, "72527270270+12345", 0, 0);--guarddescent (API
guard_descent) to a value between 0.0 and 20.0 (default
5.0).
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 "123456"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.
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
@@ -4633,8 +4633,8 @@ 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 -d "123456+12" --guardwhitespacezint -b UPCE -d "123456+12" --guardwhitespaceEAN-13 encodes a GTIN-13, a 13-digit Global Trade Item Number that +includes a standard GS1 check digit.
zint -b EAN13 --compliantheight -d "451234567890"EAN-13 encodes a GTIN-13, a 13-digit Global Trade Item Number that -includes a standard GS1 check digit. 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.
+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:
-zint -b EAN13 -d "451234567890+21"zint -b EAN13 -d "451234567890+21"will encode an EAN-13 symbol with a 2-digit add-on. As before these results can be achieved using the API:
-my_symbol->symbology = BARCODE_EAN13;
-error = ZBarcode_Encode_and_Print(my_symbol, "451234567890+21", 0, 0);my_symbol->symbology = BARCODE_EAN13;
+error = ZBarcode_Encode_and_Print(my_symbol, "451234567890+21", 0, 0);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 -d "4512345678906" --guarddescent=2.5 --guardwhitespacezint -b EAN13 -d "4512345678906" --guarddescent=2.5 --guardwhitespaceEAN-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 "7432365"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.
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 @@ -4708,12 +4709,12 @@ 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:
-zint -b EAN8 -d "7432365" --guardwhitespacezint -b EAN8 -d "7432365" --guardwhitespaceor using the API:
-my_symbol->symbology = BARCODE_EAN8;
-my_symbol->output_options |= EANUPC_GUARD_WHITESPACE;
-error = ZBarcode_Encode_and_Print(my_symbol, "7432365", 0, 0);my_symbol->symbology = BARCODE_EAN8;
+my_symbol->output_options |= EANUPC_GUARD_WHITESPACE;
+error = ZBarcode_Encode_and_Print(my_symbol, "7432365", 0, 0);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"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.
As with EAN-13, a quiet zone indicator can be added using
--guardwhitespace:
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 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), and as with the main
-EAN/UPC symbols a quiet zone indicator can be added using
----guardwhitespace. For instance
zint -b EAN_5ADDON -d '54321' --guardwhitespaceAs with the main EAN/UPC symbols a quiet zone indicator can be added
+using ---guardwhitespace. For instance
zint -b EAN_5ADDON -d "54321" --guardwhitespacewill generate a standalone 5-digit add-on with quiet zone guards, or using the API:
-my_symbol->symbology = BARCODE_EAN_5ADDON;
-my_symbol->output_options |= EANUPC_GUARD_WHITESPACE;
-error = ZBarcode_Encode_and_Print(my_symbol, "54321", 0, 0);my_symbol->symbology = BARCODE_EAN_5ADDON;
+my_symbol->output_options |= EANUPC_GUARD_WHITESPACE;
+error = ZBarcode_Encode_and_Print(my_symbol, "54321", 0, 0);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"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 and includes two hidden CRC check digits, which may be
-shown in the Human Readable Text by setting --vers=1 (API
-option_2 |= 1).
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).
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=2Based on Plessey and developed by MSI Data Corporation, MSI Plessey
-can encode numeric (digits 0-9) input of up to 92 digits. It has a range
-of check digit options that are selectable by setting
---vers (API option_2), shown in the table
-below:
MSI Plessey has a range of check digit options that are selectable by
+setting --vers (API option_2), shown in the
+table below:
zint -b BC412 -d "AQ45670" --compliantheightDesigned 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
@@ -5356,23 +5355,29 @@ 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" --compliantheightAn 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"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);my_symbol->symbology = BARCODE_CODE128;
+error = ZBarcode_Encode(my_symbol, "This", 0);
+error = ZBarcode_Encode(my_symbol, "That", 0);
+error = ZBarcode_Print(my_symbol);--bind (API
separator bars in integral 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"zint --bind --notext --separator=2 -d "This" -d "That"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=3This 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).
The 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
@@ -5421,12 +5426,6 @@ used to encode Health Industry Barcode (HIBC) data which adds a leading
'+' character and a modulo-49 check digit to the encoded
data.
zint -b CODE16K --compliantheight -d "ab0123456789"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
@@ -5435,18 +5434,24 @@ 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"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"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.
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
@@ -5475,22 +5480,16 @@ 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.
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"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 MICROPDF417 -d "12345678"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
@@ -5499,20 +5498,27 @@ 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
+
+
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. MicroPDF417 supports FAST_MODE and
-Structured Append the same as PDF417, for which see details.
FAST_MODE and Structured Append are supported the same
+as for PDF417, for which see details.
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.
zint -b DBAR_STK --compliantheight -d "9889876543210"A stacked variation of the GS1 DataBar Truncated symbol requiring the same input (see 6.1.11.1 @@ -5520,50 +5526,49 @@ 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. It can be generated with a two-dimensional component to -make a composite symbol.
+not required. +zint -b DBAR_STK --compliantheight -d "9889876543210"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"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. This symbol -can be generated with a two-dimensional component to make a composite -symbol.
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"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. 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 such symbols
-the number of columns must be at least 2.
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.
zint -b CODE49 --compliantheight -d "MULTIPLE ROWS IN 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
@@ -5571,6 +5576,12 @@ 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"GS1 Composite symbols employ a mixture of components to give more
@@ -5672,18 +5683,18 @@ 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:
zint -b EAN13_CC --mode=1 --primary=331234567890 -d "[99]1234-abcd"zint -b EAN13_CC --mode=1 --primary=331234567890 -d "[99]1234-abcd"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:
my_symbol->symbology = BARCODE_EAN13_CC;
-my_symbol->option_1 = 1;
-strcpy(my_symbol->primary, "331234567890");
-ZBarcode_Encode_and_Print(my_symbol, "[99]1234-abcd", 0, 0);my_symbol->symbology = BARCODE_EAN13_CC;
+my_symbol->option_1 = 1;
+strcpy(my_symbol->primary, "331234567890");
+ZBarcode_Encode_and_Print(my_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
@@ -5697,62 +5708,56 @@ 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.
zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=1 --primary=331234567890This 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 or an alphanumeric string of shorter length. To select
CC-A use --mode=1 (API option_1 = 1).
zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=2 --primary=331234567890zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=1 --primary=331234567890This 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=331234567890This 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"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).
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"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 POSTNET --compliantheight -d "12345678901"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
@@ -5761,13 +5766,13 @@ 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 PLANET --compliantheight -d "4012345235636"zint -b POSTNET --compliantheight -d "12345678901"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
@@ -5776,27 +5781,33 @@ 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"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"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.
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"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.
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
@@ -5822,21 +5833,21 @@ used: "S" or "X" means frame number 62,
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"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.
+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.
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"A Reply Paid version of the Australia Post 4-State Barcode (FCC 45) -which requires an 8-digit DPID input.
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"A Routing version of the Australia Post 4-State Barcode (FCC 87) -which requires an 8-digit DPID input.
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"A Redirection version of the Australia Post 4-State Barcode (FCC 92) -which requires an 8-digit DPID input.
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"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.
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"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.
Developed in 2014 as a replacement for RM4SCC this 4-state symbol +includes Reed- Solomon error correction.
zint -b MAILMARK_4S --compliantheight -d "1100000000000XY11"Developed in 2014 as a replacement for RM4SCC this 4-state symbol -includes Reed- Solomon error correction. 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.
+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.
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
-setting the --secure option (API option_1) to
-a value from the following table.
--secure option (API option_1)
+to a value from the following table.Zint does not currently implement data compression by default, but this can be initiated through the API by setting
-symbol->option_3 = ULTRA_COMPRESSION;symbol->option_3 = ULTRA_COMPRESSION;With compression, up to 504 digits, 375 alphanumerics or 252 bytes can be encoded.
Revision 2 of Ultracode (2023) may be specified using
@@ -8191,16 +8217,16 @@ Structured Append) (API structapp). The ID ranges from
Markings
Used by the United States Postal Service (USPS), the FIM symbology is +used to assist automated mail processing.
zint -b FIM --compliantheight -d "C"Used by the United States Postal Service (USPS), the FIM symbology is -used to assist automated mail processing. There are only 5 valid symbols -which can be generated using the characters A-E as shown in the table -below.
+There are only 5 valid symbols which can be generated using the +characters A-E as shown in the table below.
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"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_symbol structure
method render() which takes a Qt QPainter to
paint with, and a QRectF rectangular area specifying where
to paint into:
-/* Encode and display barcode in `paintRect` using `painter`.
- Note: legacy argument `mode` is not used */
-void render(QPainter& painter, const QRectF& paintRect,
- AspectRatioMode mode = IgnoreAspectRatio);/* Encode and display barcode in `paintRect` using `painter`.
+ Note: legacy argument `mode` is not used */
+void render(QPainter& painter, const QRectF& paintRect,
+ AspectRatioMode mode = IgnoreAspectRatio);render() will emit one of two Qt signals -
encoded on successful encoding and drawing, or
errored on failure. The client can connect and act
appropriately, for instance:
connect(qzint, SIGNAL(encoded()), SLOT(on_encoded()));
-connect(qzint, SIGNAL(errored()), SLOT(on_errored()));connect(qzint, SIGNAL(encoded()), SLOT(on_encoded()));
+connect(qzint, SIGNAL(errored()), SLOT(on_errored()));where qzint is an instance of Zint::QZint
and on_encoded() and on_error() are Qt slot
methods provided by the caller. On error, the error value and message
can be retrieved by the methods getError() and
lastError() respectively.
The other main method is save_to_file():
/* Encode and print barcode to file `filename`.
- Only sets `getError()` on error, not on warning */
-bool save_to_file(const QString& filename); // `ZBarcode_Print()`/* Encode and print barcode to file `filename`.
+ Only sets `getError()` on error, not on warning */
+bool save_to_file(const QString& filename); // `ZBarcode_Print()`which takes a filename to output to. It too will emit an
errored signal on failure, returning false
(but nothing on success, which just returns true). Note
@@ -8860,12 +8886,12 @@ symbology capabilities, and utility methods such as
A Tcl binding is available in the "backend_tcl”
sub-directory. To make on Unix:
cd backend_tcl
-autoconf
-./configure
-make
-sudo make installcd backend_tcl
+autoconf
+./configure
+make
+sudo make installFor Windows, a Microsoft Visual C++ project file is available at
"backend_tcl\zint_tcl.vcxproj". Note that this assumes that
Tcl/Tk is available in "C:\Tcl" and that the libraries are
@@ -8876,21 +8902,21 @@ to match your setup. There is also a Visual Studio makefile available at
"backend_tcl\win\README.txt".
Once built and installed, invoke the Tcl/Tk CLI
"wish":
wishwishand ignoring the Tk window click back to the command prompt
"%" and type:
package require zint
-zint helppackage require zint
+zint helpwhich will show the usage message, with options very similar to the
Zint CLI. (One notable difference is that boolean options such as
-bold take a 1 or 0 as an
argument.)
A demonstration Tcl/Tk program which is also useful in itself is
available at "backend_tcl/demo/demo.tcl". To run type:
wish demo/demo.tclwish demo/demo.tclwhich will display the following window.
--werror given
Create “out.png” (or “out.gif” if zint built without PNG support) in the current directory, as a Code 128 symbol.
-zint -d 'This Text'zint -d 'This Text'Create “qr.svg” in the current directory, as a QR Code symbol.
-zint -b QRCode -d 'This Text' -o 'qr.svg'zint -b QRCode -d 'This Text' -o 'qr.svg'Use batch mode to read from an input file “ean13nos.txt” containing a list of 13-digit GTINs, each on a separate line, to create a series of EAN-13 barcodes, formatting the output filenames to “ean001.gif”, “ean002.gif” etc. using the special character “~”.
-zint -b EAN13 --batch -i 'ean13nos.txt' -o 'ean~~~.gif'zint -b EAN13 --batch -i 'ean13nos.txt' -o 'ean~~~.gif'Please send bug reports to https://sourceforge.net/p/zint/tickets/.
diff --git a/docs/manual.pmd b/docs/manual.pmd index 1897eb61..3356e38a 100644 --- a/docs/manual.pmd +++ b/docs/manual.pmd @@ -303,27 +303,27 @@ the barcode to defaults. The `"BMP"` and `"SVG"` buttons at the bottom will copy the image to the clipboard in BMP format and SVG format respectively. Further copy-to-clipboard formats are available by clicking the `"Menu"` button, along with -`"CLI Equivalent..."`, `"Save As..."`, `"Factory Reset..."`, `"Help"`, +`"CLI Equivalent..."`, `"Save As..."`, `"Factory Reset..."`, `"Help (online)"`, `"About..."` and `"Quit"` options. Most of the options are also available in a context menu by right-clicking the preview. -{.win} +{.win #fig:menus} ## 3.2 GS1 Composite Groupbox -{.win} +{.win} In the middle of the Data tab is an area for creating composite symbologies -which appears when the currently selected symbology is supported by the GS1 -Composite symbology standard. GS1 data can then be entered with square brackets -used to separate Application Identifier (AI) information from data as shown -here. For details, see [6.3 GS1 Composite Symbols (ISO 24723)]. +which appears when the currently selected symbology supports the GS1 Composite +symbology standard. GS1 data can then be entered with square brackets used to +separate Application Identifier (AI) information from data as shown here. Round +brackets (parentheses) can be used instead if the `"GS1 ()"` checkbox is set. +For details, see [6.3 GS1 Composite Symbols (ISO 24723)]. ## 3.3 Additional ECI/Data Segments Groupbox -{.win} +{.win #fig:segs_groupbox} For symbologies that support ECIs (Extended Channel Interpretations) the middle of the Data tab is an area for entering additional data segments with their own @@ -332,8 +332,7 @@ be specified. See [4.16 Multiple Segments] for details. ## 3.4 Symbology-specific Groupbox -{.win} +{.win} Many symbologies have extra options to change the content, format and appearance of the symbol generated. For those with few additional options (and no support @@ -348,7 +347,7 @@ a second Symbology-specific tab, shown next. ## 3.5 Symbology-specific Tab -{.win} +{.win} A second tab appears for those symbologies with more than a few extra options. @@ -361,8 +360,7 @@ Append]). ## 3.6 Appearance Tab -{.win} +{.win #fig:appearance_tab} The Appearance tab can be used to adjust the dimensions and other properties of the symbol. @@ -397,9 +395,9 @@ colour picker. column on the right, must be adjusted.) The color picker only deals in RGB(A), and will overwrite any CMYK values with RGB(A) values once `"OK"` is selected. -Back in the Appearance tab, the colours can be reset to black-on-white using the -`"Reset"` button, and exchanged one for the other using the swap -{.btn} button next to it. +Referring back to [#fig:appearance_tab], the colours can be reset to +black-on-white using the `"Reset"` button, and exchanged one for the other using +the swap {.btn} button next to it. ## 3.7 Data Dialog @@ -409,8 +407,9 @@ Clicking on the ellipsis `"..."` button next to the `"Data to Encode"` text box in the Data tab opens a larger window which can be used to enter longer strings of text. You can also use this window to load data from a file. -The dialog is also available for additional ECI/Data segments by clicking the -ellipsis button to the right of their data text boxes. +The dialog is also available for additional ECI/Data segments +([#fig:segs_groupbox]) by clicking the ellipsis button to the right of their +data text boxes. Note that if your data contains line feeds (`LF`) then the data will be split into separate lines in the dialog box. On saving the data back to the main text @@ -457,12 +456,12 @@ information are taken from the main window. ## 3.10 CLI Equivalent Dialog -{.pop} +{.pop} The CLI Equivalent Dialog can be invoked from the main menu or the context menu -and displays the CLI command that will reproduce the barcode as currently -configured in the GUI. Press the `"Copy"` button to copy the command to the -clipboard, which can then be pasted into the command line. +([#fig:menus]) and displays the CLI command that will reproduce the barcode as +currently configured in the GUI. Press the `"Copy"` button to copy the command +to the clipboard, which can then be pasted into the command line. # 4. Using the Command Line @@ -1079,12 +1078,12 @@ background's alpha channel is set to zero (fully transparent). ## 4.8 Rotating the Symbol -{.lin} - The symbol can be rotated through four orientations using the `--rotate` option followed by the angle of rotation, valid values being 0 (the default), 90, 180 and 270. +{.lin} + ## 4.9 Adjusting Image Size (X-dimension) The size of the image can be altered using the `--scale` option, which sets the @@ -1315,14 +1314,12 @@ behaviour. If your data contains characters that are not in the default character set, you may encode it using an ECI-aware symbology and an ECI value from [#tbl:eci_codes] below. The ECI information is added to your code symbol as -prefix data. The symbologies that support ECI are +prefix data. The symbologies that support ECI are: ------------- ------------ ------------ -Aztec Code Grid Matrix PDF417 -Code One Han Xin Code QR Code -Data Matrix MaxiCode rMQR -DotCode MicroPDF417 Ultracode ------------- ------------ ------------ +------------ ------------ ------------ ------------ ------------ ------------ +Aztec Code Data Matrix Grid Matrix MaxiCode PDF417 rMQR +Code One DotCode Han Xin Code MicroPDF417 QR Code Ultracode +------------ ------------ ------------ ------------ ------------ ------------ Table: ECI-Aware Symbologies {#tbl:eci_aware_symbologies} @@ -1403,21 +1400,21 @@ sequence: `"E2 82 AC"`. Those 3 bytes are contained in the file `"utf8euro.txt"`. This command will generate the corresponding code: ```bash -zint -b 71 --scale=10 --eci=17 -i utf8euro.txt +zint -b DATAMATRIX --scale=10 --eci=17 -i utf8euro.txt ``` This is equivalent to the commands (using the `--esc` switch): ```bash -zint -b 71 --scale=10 --eci=17 --esc -d "\xE2\x82\xAC" +zint -b DATAMATRIX --scale=10 --eci=17 --esc -d "\xE2\x82\xAC" -zint -b 71 --scale=10 --eci=17 --esc -d "\u20AC" +zint -b DATAMATRIX --scale=10 --eci=17 --esc -d "\u20AC" ``` and to the command: ```bash -zint -b 71 --scale=10 --eci=17 -d "€" +zint -b DATAMATRIX --scale=10 --eci=17 -d "€" ``` {.i2d} @@ -1430,23 +1427,23 @@ encoding. The Big5 representation of this character is the two hex bytes: Data Matrix is: ```bash -zint -b 71 --scale=10 --eci=28 --binary -i big5char.txt +zint -b DATAMATRIX --scale=10 --eci=28 --binary -i big5char.txt ``` This is equivalent to the command (using the `--esc` switch): ```bash -zint -b 71 --scale=10 --eci=28 --binary --esc -d "\xB1\x60" +zint -b DATAMATRIX --scale=10 --eci=28 --binary --esc -d "\xB1\x60" ``` and to the commands (no `--binary` switch so conversion occurs): ```bash -zint -b 71 --scale=10 --eci=28 --esc -d "\xE5\xB8\xB8" +zint -b DATAMATRIX --scale=10 --eci=28 --esc -d "\xE5\xB8\xB8" -zint -b 71 --scale=10 --eci=28 --esc -d "\u5E38" +zint -b DATAMATRIX --scale=10 --eci=28 --esc -d "\u5E38" -zint -b 71 --scale=10 --eci=28 -d "常" +zint -b DATAMATRIX --scale=10 --eci=28 -d "常" ``` ![`zint -b DATAMATRIX --eci=28 -d "\u5E38" @@ -1459,7 +1456,7 @@ by default and do not support ECI. In this case supply UTF-8 data and use the `--binary` switch so that the data will be encoded as UTF-8 without conversion: ```bash -zint -b 58 --binary -d "UTF-8 data" +zint -b QRCODE --binary -d "UTF-8 data" ``` ![`zint -b QRCODE --binary -d "\xE2\x82\xAC\xE5\xB8\xB8" @@ -1501,28 +1498,28 @@ Table: Batch Filename Formatting {#tbl:batch_filename_formatting} For instance ```bash -zint -b EAN13 --batch -i ean13nos.txt -o file~~~.svg +zint -b EAN13 --batch -i ean13nos.txt -o "file~~~.svg" ``` The following table shows some examples to clarify this method: -Input Filenames Generated ------------------ --------------------------------------------------------- -`-o file~~~.svg` `"file001.svg"`, `"file002.svg"`, `"file003.svg"` -`-o @@@@bar.png` `"***1.png"`, `"***2.png"`, `"***3.png"` (except Windows) -`-o @@@@bar.png` `"+++1.png"`, `"+++2.png"`, `"+++3.png"` (on Windows) -`-o my~~~bar.eps` `"my001bar.eps"`, `"my002bar.eps"`, `"my003bar.eps"` -`-o t#es~t~.png` `"t es0t1.png"`, `"t es0t2.png"`, `"t es0t3.png"` +Input Filenames Generated +------------------- --------------------------------------------------------- +`-o "file~~~.svg"` `"file001.svg"`, `"file002.svg"`, `"file003.svg"` +`-o "@@@@bar.png"` `"***1.png"`, `"***2.png"`, `"***3.png"` (except Windows) +`-o "@@@@bar.png"` `"+++1.png"`, `"+++2.png"`, `"+++3.png"` (on Windows) +`-o "my~~bar~.eps"` `"my00bar1.eps"`, `"my00bar2.eps"`, `"my00bar3.eps"` +`-o "t###est.png"` `"t 1est.png"`, `"t 2est.png"`, `"t 3est.png"` Table: Batch Filename Examples {#tbl:batch_filename_examples} The special characters can span directories also, which is useful when creating a large number of barcodes: -Input Filenames Generated --------------------- ------------------------------------------------------ -`-o dir~/file~~~.svg` `"dir0/file001.svg"`, `"dir0/file002.svg"`, ... - `"dir0/file999.svg"`, `"dir1/file000.svg"`, ... +Input Filenames Generated +---------------------- ----------------------------------------------------- +`-o "dir~/file~~~.svg"` `"dir0/file001.svg"`, `"dir0/file002.svg"`, ... + `"dir0/file999.svg"`, `"dir1/file000.svg"`, ... Table: Batch Directory Examples {#tbl:batch_dir_examples} @@ -1538,7 +1535,7 @@ supplementing the `--direct` option with a `--filetype` option followed by the suffix of the file type required. For example: ```bash -zint -b 84 --direct --filetype=pcx -d "Data to encode" +zint -b MICROPDF417 --direct --filetype=pcx -d "Data to encode" ``` This command will output the symbol as a PCX file to stdout. For the supported @@ -1815,15 +1812,14 @@ client application: ```c int row, col, i = 0, j = 0; -int red, blue, green, alpha; for (row = 0; row < my_symbol->bitmap_height; row++) { for (col = 0; col < my_symbol->bitmap_width; col++) { - red = (int) my_symbol->bitmap[i]; - green = (int) my_symbol->bitmap[i + 1]; - blue = (int) my_symbol->bitmap[i + 2]; + int red = (int) my_symbol->bitmap[i]; + int green = (int) my_symbol->bitmap[i + 1]; + int blue = (int) my_symbol->bitmap[i + 2]; if (my_symbol->alphamap) { - alpha = (int) my_symbol->alphamap[j]; + int alpha = (int) my_symbol->alphamap[j]; render_rgba(row, col, red, green, blue, alpha); j++; } else { @@ -2290,12 +2286,6 @@ Symbologies can be specified by number or by name as listed in symbol->symbology = BARCODE_LOGMARS; ``` -means the same as - -```c -symbol->symbology = 50; -``` - ## 5.10 Adjusting Output Options The `output_options` member can be used to adjust various aspects of the output @@ -2375,7 +2365,7 @@ ITF-14, UPC-A and UPC-E have compliant quiet zones added by default. ## 5.11 Setting the Input Mode The way in which the input data is encoded can be set using the `input_mode` -member. Valid values are shown in the table below. +member: ------------------------------------------------------------------------------ Value Effect @@ -2467,7 +2457,7 @@ The `height` member should be set to the desired per-row value on input (it will be set to the overall height on output). `FAST_MODE` causes a less optimal encodation scheme to be used for Data Matrix, -MicroPDF417 and PDF417. For QR Code and UPNQR, it affects Zint's automatic mask +MicroPDF417 and PDF417. For QR Code and UPNQR, it limits Zint's automatic mask selection - see [6.6.3 QR Code (ISO 18004)] for details. ## 5.12 Multiple Segments @@ -2538,7 +2528,7 @@ To help with scaling the output, the following three function are available: float ZBarcode_Default_Xdim(int symbol_id); float ZBarcode_Scale_From_XdimDp(int symbol_id, float x_dim_mm, float dpmm, - const char *filetype) { + const char *filetype); float ZBarcode_XdimDP_From_Scale(int symbol_id, float scale, float x_dim_mm_or_dpmm, const char *filetype); @@ -2742,10 +2732,10 @@ two helper functions (compatible with the `libzueci`[^18] functions ```c int ZBarcode_UTF8_To_ECI(int eci, const unsigned char *source, int length, - unsigned char dest[], int *p_dest_length); + unsigned char dest[], int *p_dest_length); int ZBarcode_Dest_Len_ECI(int eci, const unsigned char *source, int length, - int *p_dest_length); + int *p_dest_length); ``` Call `ZBarcode_Dest_Len_ECI()` to get the size of buffer sufficient to @@ -2762,20 +2752,20 @@ https://sourceforge.net/projects/libzueci/). ## 5.18 Zint Version -Whether the Zint library linked to was built without PNG support may be -determined with: +Whether the Zint library was built **without** PNG support may be determined +with: ```c -int ZBarcode_NoPng(); +int ZBarcode_NoPng(void); ``` which returns 1 if PNG support is **not** available, else zero. -Similarly, but with opposite sense, whether the Zint library linked to was built -with GS1 Syntax Engine support may be determined with: +Similarly, but with opposite sense, whether the Zint library was built **with** +GS1 Syntax Engine support may be determined with: ```c -int ZBarcode_HaveGS1SyntaxEngine(); +int ZBarcode_HaveGS1SyntaxEngine(void); ``` which returns 1 if GS1 Syntax Engine support **is** available, else zero. @@ -2783,7 +2773,7 @@ which returns 1 if GS1 Syntax Engine support **is** available, else zero. Lastly, the version of the Zint library linked to is returned by: ```c -int ZBarcode_Version(); +int ZBarcode_Version(void); ``` The version parts are separated by hundreds. For instance, version `"2.9.1"` is @@ -2800,13 +2790,14 @@ widths. ### 6.1.1 Code 11 -{.lin} - 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. 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 +and the dash character (`-`) up to a maximum of 140 characters. + +{.lin} + +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 @@ -2818,54 +2809,60 @@ barcode type before using them. #### 6.1.2.1 Standard Code 2 of 5 -{.lin} - 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. 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`). +a maximum of 112 digits. + +{.lin} + +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. + {.lin} -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. No -check digit is added by default, but can be set the same as for [6.1.2.1 +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. + {.lin} -Industrial Code 2 of 5 can encode numeric input (digits 0-9) up to a maximum of -79 digits. No check digit is added by default, but can be set the same as for -[6.1.2.1 Standard Code 2 of 5]. +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. + {.lin} -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. No -check digit is added by default, but can be set the same as for [6.1.2.1 +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. + {.lin} -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. Check digit options are the -same as for [6.1.2.1 Standard Code 2 of 5]. +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 -{.lin} - 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 @@ -2873,6 +2870,8 @@ 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. +{.lin} + 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 @@ -2885,32 +2884,32 @@ bind or bindtop) and leaving the border width 0. #### 6.1.2.7 Deutsche Post Leitcode -{.lin} - 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. -#### 6.1.2.8 Deutsche Post Identcode +{.lin} -{.lin} +#### 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. +{.lin} + \clearpage ### 6.1.3 UPC (Universal Product Code) (ISO 15420) #### 6.1.3.1 UPC Version A -{.upcean} - 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. +{.upcean} + 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 @@ -2966,14 +2965,14 @@ descend below the main bars can be adjusted by setting `--guarddescent` (API #### 6.1.3.2 UPC Version E -{.upcean} - 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. +{.upcean} + 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. @@ -3005,14 +3004,15 @@ 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. + {.upcean} -EAN-13 encodes a GTIN-13, a 13-digit Global Trade Item Number that includes a -standard GS1 check digit. 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. +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: @@ -3044,11 +3044,11 @@ zint -b EAN13 -d "4512345678906" --guarddescent=2.5 --guardwhitespace #### 6.1.4.2 EAN-8 -{.upcean} - 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. +{.upcean} + 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 @@ -3077,14 +3077,14 @@ 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) -{.upcean} - 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. +{.upcean} + As with EAN-13, a quiet zone indicator can be added using `--guardwhitespace`: {.upcean} -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), and as with the main EAN/UPC symbols a quiet zone indicator can be added +As with the main EAN/UPC symbols a quiet zone indicator can be added using `---guardwhitespace`. For instance ```bash -zint -b EAN_5ADDON -d '54321' --guardwhitespace +zint -b EAN_5ADDON -d "54321" --guardwhitespace ``` will generate a standalone 5-digit add-on with quiet zone guards, or using the @@ -3124,22 +3126,24 @@ error = ZBarcode_Encode_and_Print(my_symbol, "54321", 0, 0); #### 6.1.5.1 UK Plessey -{.lin} - 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 and includes two -hidden CRC check digits, which may be shown in the Human Readable Text by -setting `--vers=1` (API `option_2 |= 1`). +A-F (i.e. hexadecimal digits) up to a maximum of 67 characters. + +{.lin} + +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. + {.lin} -Based on Plessey and developed by MSI Data Corporation, MSI Plessey can encode -numeric (digits 0-9) input of up to 92 digits. It has a range of check digit -options that are selectable by setting `--vers` (API `option_2`), shown in the -table below: +MSI 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 ----- --------------------------- @@ -3161,16 +3165,13 @@ hidden modulo-10 check digits. #### 6.1.6.1 Telepen Alpha -{.lin} - 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. -#### 6.1.6.2 Telepen Numeric +{.lin} -{.lin} +#### 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 @@ -3179,124 +3180,135 @@ followed an X character. For example: 466333 and 466X33 are valid codes whereas encoded. Telepen Numeric includes a hidden modulo-127 check digit which is added by Zint. +{.lin} + ### 6.1.7 Code 39 #### 6.1.7.1 Standard Code 39 (ISO 16388) -{.lin} - 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 (`%`). The 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 +percent (`%`). + +{.lin} + +The 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. + {.lin} -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. The check digit -options are the same as for [6.1.7.1 Standard Code 39 (ISO 16388)]. +The check digit options are the same as for [6.1.7.1 Standard Code 39 (ISO +16388)]. #### 6.1.7.3 Code 93 -{.lin} - 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`). -#### 6.1.7.4 PZN (Pharmazentralnummer) +{.lin} -{.lin} +#### 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. +{.lin} + 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 -{.lin} - 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. -#### 6.1.7.6 Code 32 +{.lin} -{.lin} +#### 6.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. -#### 6.1.7.7 HIBC Code 39 +{.lin} -{.lin} +#### 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. -#### 6.1.7.8 Vehicle Identification Number (VIN) +{.lin} -{.lin} +#### 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. An invisible Import character prefix `'I'` can be added by setting -`--vers=1` (API `option_2 = 1`). +required. + +{.lin} + +An invisible Import character prefix `'I'` can be added by setting `--vers=1` +(API `option_2 = 1`). ### 6.1.8 Codabar (EN 798) -{.lin} - 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. 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`). +adopted Codabar in 1979 as the standard barcode for blood products. + +{.lin} + +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 -{.lin} - 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. +{.lin} + ### 6.1.10 Code 128 #### 6.1.10.1 Standard Code 128 (ISO 15417) -{.lin} - 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. +{.lin} + 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 @@ -3338,12 +3350,12 @@ alphanumerics) are not recommended. #### 6.1.10.2 Code 128 Suppress Code Set C (Code Sets A and B only) -{.lin} - It is sometimes advantageous to stop Code 128 from using Code Set C which compresses numerical data. The `BARCODE_CODE128AB`[^19] variant (symbology 60) suppresses Code Set C in favour of Code Sets A and B. +{.lin} + Note that the special extra escapes mentioned above are not available for this variant (nor for any other). @@ -3352,15 +3364,15 @@ still recognised. #### 6.1.10.3 GS1-128 -![`zint -b GS1_128 --compliantheight -d -"[01]98898765432106[3202]012345[15]991231"`](images/gs1_128.svg){.lin} - A variation of Code 128 previously known as UCC/EAN-128, this symbology is defined by the GS1 General Specifications. Application Identifiers (AIs) should be entered using [square bracket] notation. These will be converted to parentheses (round brackets) for the Human Readable Text. This method allows the inclusion of parentheses in the AI data without escaping. +![`zint -b GS1_128 --compliantheight -d +"[01]98898765432106[3202]012345[15]991231"`](images/gs1_128.svg){.lin} + For compatibility with data entry in other systems, the option `--gs1parens` (API `input_mode |= GS1PARENS_MODE`) may be used to signal that AIs are encased in parentheses. If there are any opening parentheses in the AI data, they must @@ -3373,29 +3385,26 @@ 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: ```bash -zint -b 16 -d "[01]98898765432106[3202]012345[15]991231" +zint -b GS1_128 -d "[01]98898765432106[3202]012345[15]991231" ``` or using the `--gs1parens` option: ```bash -zint -b 16 --gs1parens -d "(01)98898765432106(3202)012345(15)991231" +zint -b GS1_128 --gs1parens -d "(01)98898765432106(3202)012345(15)991231" ``` #### 6.1.10.4 EAN-14 -{.lin} - 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. -#### 6.1.10.5 NVE-18 (SSCC-18) +{.lin} -{.lin} +#### 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 @@ -3404,25 +3413,29 @@ 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. +{.lin} + #### 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. + {.lin} -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. - #### 6.1.10.7 DPD Code +Another variation of Code 128 as used by DPD (Deutscher Paketdienst). + {.lin} -Another variation of Code 128 as used by DPD (Deutscher Paketdienst). 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: +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 Tracking Number Service Destination Country @@ -3454,37 +3467,39 @@ half height. In this case, an input of 27 alphanumeric characters is required. #### 6.1.10.8 UPU S10 -{.lin} - 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. +{.lin} + 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 are due to -replace GS1-128 symbols in accordance with the GS1 General Specifications. If a -GS1 DataBar symbol is to be printed with a 2D component as specified in ISO/IEC -24723 set `--mode=2` (API `option_1 = 2`). See [6.3 GS1 Composite Symbols (ISO -24723)] to find out how to generate DataBar symbols with 2D components. +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 -{.lin} - 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. +{.lin} + 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. @@ -3494,9 +3509,6 @@ produce a GS1 DataBar Truncated symbol set the symbol height to a value between #### 6.1.11.2 GS1 DataBar Limited -{.lin} - 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 @@ -3505,10 +3517,10 @@ 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. -#### 6.1.11.3 GS1 DataBar Expanded +{.lin} -![`zint -b DBAR_EXP --compliantheight -d -"[01]98898765432106[3202]012345[15]991231"`](images/dbar_exp.svg){.lin} +#### 6.1.11.3 GS1 DataBar Expanded Previously 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 @@ -3517,6 +3529,9 @@ encoding data from a number of AIs in a single symbol. AIs should be encased in parentheses in the AI data without escaping. The AIs may alternatively be encased in parentheses using the `--gs1parens` switch - see [6.1.10.3 GS1-128]. +![`zint -b DBAR_EXP --compliantheight -d +"[01]98898765432106[3202]012345[15]991231"`](images/dbar_exp.svg){.lin} + 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 @@ -3524,19 +3539,17 @@ numerics or 41 alphanumerics. The following is an example of a valid GS1 DataBar Expanded input: ```bash -zint -b 31 -d "[01]98898765432106[3202]012345[15]991231" +zint -b DBAR_EXP -d "[01]98898765432106[3202]012345[15]991231" ``` ### 6.1.12 Korea Post Barcode -{.lin} - The Korean Postal Barcode is used to encode a 6-digit number and includes one check digit. -### 6.1.13 Channel Code +{.lin} -{.lin} +### 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 @@ -3544,6 +3557,8 @@ 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. +{.lin} + The maximum values permitted depend on the number of channels used as shown in the table below: @@ -3560,8 +3575,6 @@ Table: Channel Value Ranges {#tbl:channel_maxima} ### 6.1.14 BC412 (SEMI T1-95) -{.lin} - 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 @@ -3569,6 +3582,8 @@ 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. +{.lin} + \clearpage ## 6.2 Stacked Symbologies @@ -3618,14 +3633,14 @@ demonstrated by the symbologies below. ### 6.2.2 Codablock-F -{.lin} - 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). +{.lin} + The 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 @@ -3637,9 +3652,6 @@ modulo-49 check digit to the encoded data. ### 6.2.3 Code 16K (EN 12323) -{.lin} - 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 @@ -3648,15 +3660,18 @@ 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) +{.lin} -{.lin} +### 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. +{.lin} + 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 @@ -3683,15 +3698,13 @@ triplet `"900"` exceeds `"899"`. The triplets are 0-filled, for instance ### 6.2.5 Compact PDF417 (ISO 15438) -{.lin} - 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) +{.lin} -{.lin} +### 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 @@ -3700,58 +3713,64 @@ 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 -`FAST_MODE` and Structured Append the same as PDF417, for which see details. +{.lin} + +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) -#### 6.2.7.1 GS1 DataBar Stacked +The following are stacked counterparts of those in [6.1.11 GS1 DataBar +(ISO 24724)], GS1 DataBar Limited excluded. -{.lin} +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. It can be generated with a two-dimensional component to make a -composite symbol. +required. + +{.lin} #### 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. + {.lin} -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. This -symbol can be generated with a two-dimensional component to make a composite -symbol. - #### 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"`](images/dbar_expstk.svg){.lin} -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. 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 such symbols the +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 -{.lin} - 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 @@ -3759,6 +3778,9 @@ 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. +{.lin} + \clearpage ## 6.3 GS1 Composite Symbols (ISO 24723) @@ -3844,19 +3866,16 @@ followed by 1, 2 or 3 for CC-A, CC-B or CC-C respectively. ### 6.3.1 CC-A -![`zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=1 ---primary=331234567890`](images/ean13_cc_a.svg){.upcean} - 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 or an alphanumeric string of shorter length. To select CC-A use `--mode=1` (API `option_1 = 1`). -### 6.3.2 CC-B +![`zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=1 +--primary=331234567890`](images/ean13_cc_a.svg){.upcean} -![`zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=2 ---primary=331234567890`](images/ean13_cc_b.svg){.upcean} +### 6.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 @@ -3864,33 +3883,33 @@ 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`). -### 6.3.3 CC-C +![`zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=2 +--primary=331234567890`](images/ean13_cc_b.svg){.upcean} -![`zint -b GS1_128_CC --compliantheight -d "[99]1234-abcd" --mode=3 ---primary="[01]03312345678903"`](images/gs1_128_cc_c.svg){.upcean} +### 6.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"`](images/gs1_128_cc_c.svg){.upcean} + \clearpage ## 6.4 Two-Track Symbols ### 6.4.1 Pharmacode Two-Track -{.trk} - 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. -### 6.4.2 POSTNET +{.trk} -{.trk} +### 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 @@ -3900,10 +3919,10 @@ to 38 digits in length, standard lengths as used by USPS were `PostNet6` `PostNet12` (5-digit ZIP + 6-digit user data), and a warning will be issued if the input length is not one of these. -### 6.4.3 PLANET +{.trk} -{.trk} +### 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 @@ -3913,24 +3932,27 @@ 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. -### 6.4.4 Brazilian CEPNet +{.trk} -{.trk} +### 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. -### 6.4.5 DX Film Edge Barcode +{.trk} -{.trk} +### 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. +{.trk} + 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 @@ -3965,16 +3987,18 @@ https://thebigfilmdatabase.merinorus.com). #### 6.5.1.1 Customer Barcodes -{.trk} - 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. +on mail items. + +{.trk} + +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 Required Input Format Symbol FCC Encoding @@ -3995,37 +4019,35 @@ Table: Australia Post Input Formats {#tbl:auspost_input_formats} #### 6.5.1.2 Reply Paid Barcode -{.trk} - A Reply Paid version of the Australia Post 4-State Barcode (FCC 45) which requires an 8-digit DPID input. -#### 6.5.1.3 Routing Barcode +{.trk} -{.trk} +#### 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. -#### 6.5.1.4 Redirect Barcode +{.trk} -{.trk} +#### 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. -### 6.5.2 Dutch Post KIX Code +{.trk} -{.trk} +### 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. -### 6.5.3 Royal Mail 4-State Customer Code (RM4SCC) +{.trk} -{.trk} +### 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 @@ -4033,16 +4055,19 @@ 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. +{.trk} + ### 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. + {.trk} -Developed in 2014 as a replacement for RM4SCC this 4-state symbol includes Reed- -Solomon error correction. 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. +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 Class Supply Chain ID Item ID Destination+DPS @@ -4075,16 +4100,18 @@ 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. + {.trk} -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. 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: +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"` @@ -4093,24 +4120,26 @@ all of the following inputs are valid data entries: ### 6.5.6 Japanese Postal Code -{.trk} - 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. -### 6.5.7 DAFT Code +{.trk} -{.trk} +### 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. The 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%). +characters are invalid. + +{.trk} + +The 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 @@ -4131,18 +4160,20 @@ zint -b RM4SCC --compliantheight -d "W1J0TR01" ### 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. + {.i2dbig} -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. Data 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. +Data 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 ----- ----------- -- ----- ----------- -- ----- ----------- @@ -4280,10 +4311,11 @@ 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. + {.i2dbig} -Also known as Quick Response Code this symbology was developed by Denso. Four -levels of error correction are available using the `--secure` option (API +Four 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 @@ -4354,14 +4386,16 @@ calculation must be done outside of Zint. ### 6.6.4 Micro QR Code (ISO 18004) -{.i2dbig} - 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. 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. +being carried out automatically by Zint. + +{.i2dbig} + +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 @@ -4416,14 +4450,15 @@ option_3 = ZINT_FULL_MULTIBYTE | (N + 1) << 8 ### 6.6.5 Rectangular Micro QR Code (rMQR) (ISO 23941) -{.i2dbig} - 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. 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. +conversion being handled by Zint. + +{.i2dbig} + +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 ----- --------- ------------------------- ----------------- @@ -4489,37 +4524,42 @@ using the `--fullmultibyte` switch or in the API by setting ### 6.6.6 UPNQR (Univerzalnega Plačilnega Naloga QR) -{.i2d} - 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. UPNQR 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`). +need to be specified. + +{.i2d} + +UPNQR 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: ```bash -zint -o upnqr.png -b 143 --scale=3 --binary -i upn.txt +zint -o upnqr.png -b UPNQR --scale=3 --binary -i upn.txt ``` -A mask may be manually specified or the `--fast` option used as with QRCODE. +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. + {.i2d} -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. MaxiCode 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. +MaxiCode 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 @@ -4543,7 +4583,7 @@ switch (API `primary`). The secondary message uses the normal data entry method. For example: ```bash -zint -o test.eps -b 57 --primary="999999999840012" \ +zint -o test.eps -b MAXICODE --primary="999999999840012" \ -d "Secondary Message Here" ``` @@ -4559,7 +4599,7 @@ prefixed by the ISO/IEC 15434 Format `"01"` (transportation) sequence MH10/SC 8): ```bash -zint -b 57 --primary="152382802840001" --scmvv=96 --esc -d \ +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" ``` @@ -4571,7 +4611,7 @@ 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: ```bash -zint -o test.eps -b 57 --mode=4 -d "A MaxiCode Message in Mode 4" +zint -o test.eps -b MAXICODE --mode=4 -d "A MaxiCode Message in Mode 4" ``` Mode 6 is reserved for the maintenance of scanner hardware and should not be @@ -4612,17 +4652,18 @@ 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. + {.i2d} -Invented by Andrew Longacre at Welch Allyn Inc in 1995 the Aztec Code symbol is -a matrix symbol with a distinctive bullseye 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: +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, mutally exclusive, are available to change this behaviour: -The size of the symbol can be specified using the `--vers` option (API +1) The size of the symbol can be specified using the `--vers` option (API `option_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. @@ -4646,9 +4687,10 @@ Table: Aztec Code Sizes {#tbl:aztec_sizes} 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. +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 +2) Alternatively the amount of error correction data can be specified by setting the `--secure` option (API `option_1`) to a value from the following table. Mode Error Correction Capacity @@ -4676,22 +4718,24 @@ cannot contain spaces. If an ID is not given, no ID is encoded. ### 6.6.9 Aztec Runes (ISO 24778) -{.i2d} - 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. -### 6.6.10 Code One +{.i2d} -{.i2d} +### 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. 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: +GS1 data, and also supports the ECI mechanism. + +{.i2d} + +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 Numeric Alphanumeric @@ -4730,9 +4774,6 @@ GS1 data nor for Version S symbols. ### 6.6.11 Grid Matrix -{.i2d} - 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 @@ -4740,6 +4781,9 @@ 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. +{.i2d} + 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` @@ -4778,9 +4822,6 @@ Structured Append]) (API `structapp`). The ID ranges from 0 (default) to 255. ### 6.6.12 DotCode -![`zint -b DOTCODE -d "[01]00012345678905[17]201231[10]ABC123456" ---gs1`](images/dotcode.svg){.i2d} - 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 @@ -4791,6 +4832,9 @@ 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" +--gs1`](images/dotcode.svg){.i2d} + DotCode 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 @@ -4803,14 +4847,14 @@ It does not support specifying an ID. ### 6.6.13 Han Xin Code (ISO 20830) -{.i2d} - 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. +{.i2d} + 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. @@ -4879,12 +4923,14 @@ option_3 = ZINT_FULL_MULTIBYTE | (N + 1) << 8 ### 6.6.14 Ultracode +This symbology uses a grid of coloured elements to encode data. ECI and GS1 +modes are supported. + {.ultra} -This symbology uses a grid of coloured elements to encode data. ECI and GS1 -modes are supported. The amount of error correction can be set using the -`--secure` option (API `option_1`) to a value as shown in the following table. +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 ----- -------- ---------------------------------------------- @@ -4927,11 +4973,13 @@ is not given, no ID is encoded. ### 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. + {.trk} -Used by the United States Postal Service (USPS), the FIM symbology is used to -assist automated mail processing. There are only 5 valid symbols which can be -generated using the characters A-E as shown in the table below. +There are only 5 valid symbols which can be generated using the characters A-E +as shown in the table below. Code Letter Usage ----------- -------------------------------------------------------------- @@ -4946,13 +4994,13 @@ Table: Valid FIM Characters {#tbl:fim_characters} ### 6.7.2 Flattermarken -{.lin} - 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. +{.lin} + # 7. Legal and Version Information diff --git a/docs/manual.txt b/docs/manual.txt index ae826b97..86381bf5 100644 --- a/docs/manual.txt +++ b/docs/manual.txt @@ -471,24 +471,26 @@ reset all settings for the barcode to defaults. The "BMP" and "SVG" buttons at the bottom will copy the image to the clipboard in BMP format and SVG format respectively. Further copy-to-clipboard formats are available by clicking the "Menu" button, along with "CLI Equivalent...", -"Save As...", "Factory Reset...", "Help", "About..." and "Quit" options. Most of -the options are also available in a context menu by right-clicking the preview. +"Save As...", "Factory Reset...", "Help (online)", "About..." and "Quit" +options. Most of the options are also available in a context menu by +right-clicking the preview. -[Zint Barcode Studio main menu (left) and context menu (right)] +[Main menu (left) and context menu (right)] 3.2 GS1 Composite Groupbox -[Zint Barcode Studio encoding GS1 Composite data] +[Encoding GS1 Composite data] In the middle of the Data tab is an area for creating composite symbologies -which appears when the currently selected symbology is supported by the GS1 -Composite symbology standard. GS1 data can then be entered with square brackets -used to separate Application Identifier (AI) information from data as shown -here. For details, see 6.3 GS1 Composite Symbols (ISO 24723). +which appears when the currently selected symbology supports the GS1 Composite +symbology standard. GS1 data can then be entered with square brackets used to +separate Application Identifier (AI) information from data as shown here. Round +brackets (parentheses) can be used instead if the "GS1 ()" checkbox is set. For +details, see 6.3 GS1 Composite Symbols (ISO 24723). 3.3 Additional ECI/Data Segments Groupbox -[Zint Barcode Studio encoding multiple segments] +[Encoding multiple segments] For symbologies that support ECIs (Extended Channel Interpretations) the middle of the Data tab is an area for entering additional data segments with their own @@ -497,7 +499,7 @@ specified. See 4.16 Multiple Segments for details. 3.4 Symbology-specific Groupbox -[Zint Barcode Studio showing Code 2 of 5 Interleaved settings] +[Code 2 of 5 Interleaved Groupbox] Many symbologies have extra options to change the content, format and appearance of the symbol generated. For those with few additional options (and no support @@ -512,7 +514,7 @@ a second Symbology-specific tab, shown next. 3.5 Symbology-specific Tab -[Zint Barcode Studio showing Aztec Code options] +[Aztec Code Tab] A second tab appears for those symbologies with more than a few extra options. @@ -524,7 +526,7 @@ as part of a Structured Append sequence of symbols (see 4.17 Structured Append). 3.6 Appearance Tab -[Zint Barcode Studio showing Appearance tab options] +[Appearance Tab] The Appearance tab can be used to adjust the dimensions and other properties of the symbol. @@ -557,9 +559,9 @@ which invoke a colour picker. column on the right, must be adjusted.) The color picker only deals in RGB(A), and will overwrite any CMYK values with RGB(A) values once "OK" is selected. -Back in the Appearance tab, the colours can be reset to black-on-white using the -"Reset" button, and exchanged one for the other using the swap [swap] button -next to it. +Referring back to Figure 7: Appearance Tab, the colours can be reset to +black-on-white using the "Reset" button, and exchanged one for the other using +the swap [swap] button next to it. 3.7 Data Dialog @@ -569,8 +571,9 @@ Clicking on the ellipsis "..." button next to the "Data to Encode" text box in the Data tab opens a larger window which can be used to enter longer strings of text. You can also use this window to load data from a file. -The dialog is also available for additional ECI/Data segments by clicking the -ellipsis button to the right of their data text boxes. +The dialog is also available for additional ECI/Data segments (Figure 4: +Encoding multiple segments) by clicking the ellipsis button to the right of +their data text boxes. Note that if your data contains line feeds (LF) then the data will be split into separate lines in the dialog box. On saving the data back to the main text box @@ -616,12 +619,13 @@ information are taken from the main window. 3.10 CLI Equivalent Dialog -[CLI Equivalent Dialog] +[Replicating via the command line] The CLI Equivalent Dialog can be invoked from the main menu or the context menu -and displays the CLI command that will reproduce the barcode as currently -configured in the GUI. Press the "Copy" button to copy the command to the -clipboard, which can then be pasted into the command line. +(Figure 2: Main menu (left) and context menu (right)) and displays the CLI +command that will reproduce the barcode as currently configured in the GUI. +Press the "Copy" button to copy the command to the clipboard, which can then be +pasted into the command line. 4. Using the Command Line @@ -1175,12 +1179,12 @@ which case they will be converted formulaically to CMYK approximations. 4.8 Rotating the Symbol -[zint -d "This Text" --rotate=90] - The symbol can be rotated through four orientations using the --rotate option followed by the angle of rotation, valid values being 0 (the default), 90, 180 and 270. +[zint -d "This Text" --rotate=90] + 4.9 Adjusting Image Size (X-dimension) The size of the image can be altered using the --scale option, which sets the @@ -1388,14 +1392,12 @@ behaviour. If your data contains characters that are not in the default character set, you may encode it using an ECI-aware symbology and an ECI value from Table 8: ECI Codes below. The ECI information is added to your code symbol as prefix data. -The symbologies that support ECI are +The symbologies that support ECI are: - ------------- -------------- ----------- - Aztec Code Grid Matrix PDF417 - Code One Han Xin Code QR Code - Data Matrix MaxiCode rMQR - DotCode MicroPDF417 Ultracode - ------------- -------------- ----------- + ------------ ------------- -------------- ------------- --------- ----------- + Aztec Code Data Matrix Grid Matrix MaxiCode PDF417 rMQR + Code One DotCode Han Xin Code MicroPDF417 QR Code Ultracode + ------------ ------------- -------------- ------------- --------- ----------- Table 7: ECI-Aware Symbologies @@ -1472,17 +1474,17 @@ ISO/IEC 8859-15 codepoint hex "A4". It is encoded in UTF-8 as the hex sequence: "E2 82 AC". Those 3 bytes are contained in the file "utf8euro.txt". This command will generate the corresponding code: - zint -b 71 --scale=10 --eci=17 -i utf8euro.txt + zint -b DATAMATRIX --scale=10 --eci=17 -i utf8euro.txt This is equivalent to the commands (using the --esc switch): - zint -b 71 --scale=10 --eci=17 --esc -d "\xE2\x82\xAC" + zint -b DATAMATRIX --scale=10 --eci=17 --esc -d "\xE2\x82\xAC" - zint -b 71 --scale=10 --eci=17 --esc -d "\u20AC" + zint -b DATAMATRIX --scale=10 --eci=17 --esc -d "\u20AC" and to the command: - zint -b 71 --scale=10 --eci=17 -d "€" + zint -b DATAMATRIX --scale=10 --eci=17 -d "€" [zint -b DATAMATRIX --eci=17 -d "€"] @@ -1493,19 +1495,19 @@ encoding. The Big5 representation of this character is the two hex bytes: "B1 60" (contained in the file "big5char.txt"). The generation command for Data Matrix is: - zint -b 71 --scale=10 --eci=28 --binary -i big5char.txt + zint -b DATAMATRIX --scale=10 --eci=28 --binary -i big5char.txt This is equivalent to the command (using the --esc switch): - zint -b 71 --scale=10 --eci=28 --binary --esc -d "\xB1\x60" + zint -b DATAMATRIX --scale=10 --eci=28 --binary --esc -d "\xB1\x60" and to the commands (no --binary switch so conversion occurs): - zint -b 71 --scale=10 --eci=28 --esc -d "\xE5\xB8\xB8" + zint -b DATAMATRIX --scale=10 --eci=28 --esc -d "\xE5\xB8\xB8" - zint -b 71 --scale=10 --eci=28 --esc -d "\u5E38" + zint -b DATAMATRIX --scale=10 --eci=28 --esc -d "\u5E38" - zint -b 71 --scale=10 --eci=28 -d "常" + zint -b DATAMATRIX --scale=10 --eci=28 -d "常" [zint -b DATAMATRIX --eci=28 -d "\u5E38" --esc] @@ -1515,7 +1517,7 @@ Some decoders (in particular mobile app ones) for QR Code assume UTF-8 encoding by default and do not support ECI. In this case supply UTF-8 data and use the --binary switch so that the data will be encoded as UTF-8 without conversion: - zint -b 58 --binary -d "UTF-8 data" + zint -b QRCODE --binary -d "UTF-8 data" [zint -b QRCODE --binary -d "\xE2\x82\xAC\xE5\xB8\xB8" --esc] @@ -1551,27 +1553,27 @@ characters in the output filename as shown in the table below: For instance - zint -b EAN13 --batch -i ean13nos.txt -o file~~~.svg + zint -b EAN13 --batch -i ean13nos.txt -o "file~~~.svg" The following table shows some examples to clarify this method: - Input Filenames Generated - ----------------- ----------------------------------------------------- - -o file~~~.svg "file001.svg", "file002.svg", "file003.svg" - -o @@@@bar.png "***1.png", "***2.png", "***3.png" (except Windows) - -o @@@@bar.png "+++1.png", "+++2.png", "+++3.png" (on Windows) - -o my~~~bar.eps "my001bar.eps", "my002bar.eps", "my003bar.eps" - -o t#es~t~.png "t es0t1.png", "t es0t2.png", "t es0t3.png" + Input Filenames Generated + ------------------- ----------------------------------------------------- + -o "file~~~.svg" "file001.svg", "file002.svg", "file003.svg" + -o "@@@@bar.png" "***1.png", "***2.png", "***3.png" (except Windows) + -o "@@@@bar.png" "+++1.png", "+++2.png", "+++3.png" (on Windows) + -o "my~~bar~.eps" "my00bar1.eps", "my00bar2.eps", "my00bar3.eps" + -o "t###est.png" "t 1est.png", "t 2est.png", "t 3est.png" Table 10: Batch Filename Examples The special characters can span directories also, which is useful when creating a large number of barcodes: - Input Filenames Generated - --------------------- ------------------------------------------- - -o dir~/file~~~.svg "dir0/file001.svg", "dir0/file002.svg", … - "dir0/file999.svg", "dir1/file000.svg", … + Input Filenames Generated + ----------------------- ------------------------------------------- + -o "dir~/file~~~.svg" "dir0/file001.svg", "dir0/file002.svg", … + "dir0/file999.svg", "dir1/file000.svg", … Table 11: Batch Directory Examples @@ -1586,7 +1588,7 @@ image (or GIF image if libpng is not present), but this can be altered by supplementing the --direct option with a --filetype option followed by the suffix of the file type required. For example: - zint -b 84 --direct --filetype=pcx -d "Data to encode" + zint -b MICROPDF417 --direct --filetype=pcx -d "Data to encode" This command will output the symbol as a PCX file to stdout. For the supported output file formats see Table 3: Output File Formats. @@ -1842,15 +1844,14 @@ functions for drawing an RGB and RGBA pixel on the screen implemented by the client application: int row, col, i = 0, j = 0; - int red, blue, green, alpha; for (row = 0; row < my_symbol->bitmap_height; row++) { for (col = 0; col < my_symbol->bitmap_width; col++) { - red = (int) my_symbol->bitmap[i]; - green = (int) my_symbol->bitmap[i + 1]; - blue = (int) my_symbol->bitmap[i + 2]; + int red = (int) my_symbol->bitmap[i]; + int green = (int) my_symbol->bitmap[i + 1]; + int blue = (int) my_symbol->bitmap[i + 2]; if (my_symbol->alphamap) { - alpha = (int) my_symbol->alphamap[j]; + int alpha = (int) my_symbol->alphamap[j]; render_rgba(row, col, red, green, blue, alpha); j++; } else { @@ -2279,10 +2280,6 @@ Types (Symbologies). For example symbol->symbology = BARCODE_LOGMARS; -means the same as - - symbol->symbology = 50; - 5.10 Adjusting Output Options The output_options member can be used to adjust various aspects of the output @@ -2351,7 +2348,7 @@ together when adjusting this value: 5.11 Setting the Input Mode The way in which the input data is encoded can be set using the input_mode -member. Valid values are shown in the table below. +member: ------------------------------------------------------------------------------ Value Effect @@ -2436,7 +2433,7 @@ height member should be set to the desired per-row value on input (it will be set to the overall height on output). FAST_MODE causes a less optimal encodation scheme to be used for Data Matrix, -MicroPDF417 and PDF417. For QR Code and UPNQR, it affects Zint’s automatic mask +MicroPDF417 and PDF417. For QR Code and UPNQR, it limits Zint’s automatic mask selection - see 6.6.3 QR Code (ISO 18004) for details. 5.12 Multiple Segments @@ -2500,7 +2497,7 @@ To help with scaling the output, the following three function are available: float ZBarcode_Default_Xdim(int symbol_id); float ZBarcode_Scale_From_XdimDp(int symbol_id, float x_dim_mm, float dpmm, - const char *filetype) { + const char *filetype); float ZBarcode_XdimDP_From_Scale(int symbol_id, float scale, float x_dim_mm_or_dpmm, const char *filetype); @@ -2678,10 +2675,10 @@ two helper functions (compatible with the libzueci[18] functions zueci_utf8_to_eci() and zueci_dest_len_eci()): int ZBarcode_UTF8_To_ECI(int eci, const unsigned char *source, int length, - unsigned char dest[], int *p_dest_length); + unsigned char dest[], int *p_dest_length); int ZBarcode_Dest_Len_ECI(int eci, const unsigned char *source, int length, - int *p_dest_length); + int *p_dest_length); Call ZBarcode_Dest_Len_ECI() to get the size of buffer sufficient to accommodate the conversion, then call ZBarcode_UTF8_To_ECI() with an appropriately sized @@ -2693,23 +2690,22 @@ NUL-terminated. The destination buffer is not NUL-terminated. The obsolete ECIs 5.18 Zint Version -Whether the Zint library linked to was built without PNG support may be -determined with: +Whether the Zint library was built without PNG support may be determined with: - int ZBarcode_NoPng(); + int ZBarcode_NoPng(void); which returns 1 if PNG support is not available, else zero. -Similarly, but with opposite sense, whether the Zint library linked to was built -with GS1 Syntax Engine support may be determined with: +Similarly, but with opposite sense, whether the Zint library was built with GS1 +Syntax Engine support may be determined with: - int ZBarcode_HaveGS1SyntaxEngine(); + int ZBarcode_HaveGS1SyntaxEngine(void); which returns 1 if GS1 Syntax Engine support is available, else zero. Lastly, the version of the Zint library linked to is returned by: - int ZBarcode_Version(); + int ZBarcode_Version(void); The version parts are separated by hundreds. For instance, version "2.9.1" is returned as "20901". @@ -2724,13 +2720,15 @@ widths. 6.1.1 Code 11 -[zint -b CODE11 -d "9212320967"] - 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. 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). +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 @@ -2741,53 +2739,59 @@ barcode type before using them. 6.1.2.1 Standard Code 2 of 5 -[zint -b C25STANDARD -d "9212320967"] - 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. 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). +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"] -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. No -check digit is added by default, but can be set the same as for 6.1.2.1 Standard -Code 2 of 5. +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"] -Industrial Code 2 of 5 can encode numeric input (digits 0-9) up to a maximum of -79 digits. No check digit is added by default, but can be set the same as for -6.1.2.1 Standard Code 2 of 5. +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) -[zint -b C25INTER --compliantheight -d "9212320967"] - 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. No -check digit is added by default, but can be set the same as for 6.1.2.1 Standard -Code 2 of 5. +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"] -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. Check digit options are the -same as for 6.1.2.1 Standard Code 2 of 5. +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 -[zint -b ITF14 --compliantheight -d "9212320967145"] - 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 @@ -2795,6 +2799,8 @@ 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 @@ -2806,30 +2812,30 @@ bind or bindtop) and leaving the border width 0. 6.1.2.7 Deutsche Post Leitcode -[zint -b DPLEIT -d "9212320967145"] - 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. -6.1.2.8 Deutsche Post Identcode +[zint -b DPLEIT -d "9212320967145"] -[zint -b DPIDENT -d "91232096712"] +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 -[zint -b UPCA --compliantheight -d "72527270270"] - 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 "72527270270"] + 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 @@ -2875,14 +2881,14 @@ guard_descent) to a value between 0.0 and 20.0 (default 5.0). 6.1.3.2 UPC Version E -[zint -b UPCE --compliantheight -d "123456"] - 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 "123456"] + 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. @@ -2911,13 +2917,14 @@ 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 "451234567890"] -EAN-13 encodes a GTIN-13, a 13-digit Global Trade Item Number that includes a -standard GS1 check digit. 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. +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: @@ -2942,11 +2949,11 @@ bar descent height are the same as for 6.1.3.2 UPC Version E. For instance: 6.1.4.2 EAN-8 -[zint -b EAN8 --compliantheight -d "7432365"] - 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 "7432365"] + 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 @@ -2970,13 +2977,13 @@ 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) -[zint -b ISBNX --compliantheight -d "9789295055124"] - 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" --guardwhitespace] @@ -2987,14 +2994,16 @@ height - see 6.1.3.2 UPC Version E. 6.1.4.4 EAN/UPC Add-Ons (standalone) -[zint -b EAN_2ADDON --compliantheight -d "12"] - 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), and as with the main EAN/UPC symbols a quiet zone indicator can be added -using ---guardwhitespace. For instance +(12). - zint -b EAN_5ADDON -d '54321' --guardwhitespace +[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 + + zint -b EAN_5ADDON -d "54321" --guardwhitespace will generate a standalone 5-digit add-on with quiet zone guards, or using the API: @@ -3009,22 +3018,24 @@ API: 6.1.5.1 UK Plessey -[zint -b PLESSEY -d "C64"] - 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 and includes two -hidden CRC check digits, which may be shown in the Human Readable Text by -setting --vers=1 (API option_2 |= 1). +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=2] -Based on Plessey and developed by MSI Data Corporation, MSI Plessey can encode -numeric (digits 0-9) input of up to 92 digits. It has a range of check digit -options that are selectable by setting --vers (API option_2), shown in the table -below: +MSI 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 ------- ----------------------------- @@ -3046,15 +3057,13 @@ modulo-10 check digits. 6.1.6.1 Telepen Alpha -[zint -b TELEPEN --compliantheight -d "Z80"] - 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. -6.1.6.2 Telepen Numeric +[zint -b TELEPEN --compliantheight -d "Z80"] -[zint -b TELEPEN_NUM --compliantheight -d "466X33"] +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 @@ -3063,121 +3072,129 @@ followed an X character. For example: 466333 and 466X33 are valid codes whereas 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) -[zint -b CODE39 --compliantheight -d "1A" --vers=1] - 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=1] + The 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"] -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. The check digit -options are the same as for 6.1.7.1 Standard Code 39 (ISO 16388). +The check digit options are the same as for 6.1.7.1 Standard Code 39 (ISO +16388). 6.1.7.3 Code 93 -[zint -b CODE93 --compliantheight -d "C93"] - 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). -6.1.7.4 PZN (Pharmazentralnummer) +[zint -b CODE93 --compliantheight -d "C93"] -[zint -b PZN --compliantheight -d "2758089"] +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 -[zint -b LOGMARS --compliantheight -d "12345/ABCDE" --vers=1] - 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. -6.1.7.6 Code 32 +[zint -b LOGMARS --compliantheight -d "12345/ABCDE" --vers=1] -[zint -b CODE32 --compliantheight -d "14352312"] +6.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. -6.1.7.7 HIBC Code 39 +[zint -b CODE32 --compliantheight -d "14352312"] -[zint -b HIBC_39 --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. -6.1.7.8 Vehicle Identification Number (VIN) +[zint -b HIBC_39 --compliantheight -d "14352312"] -[zint -b VIN -d "2FTPX28L0XCA15511" --vers=1] +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. An -invisible Import character prefix 'I' can be added by setting --vers=1 (API +17 character input (0-9, and A-Z excluding 'I', 'O' and 'Q') is required. + +[zint -b VIN -d "2FTPX28L0XCA15511" --vers=1] + +An invisible Import character prefix 'I' can be added by setting --vers=1 (API option_2 = 1). 6.1.8 Codabar (EN 798) -[zint -b CODABAR --compliantheight -d "A37859B"] - 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. 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). +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 -[zint -b PHARMA --compliantheight -d "130170"] - 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) -[zint -b CODE128 --bind -d "130170X178"] - 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 @@ -3212,26 +3229,26 @@ alphanumerics) are not recommended. 6.1.10.2 Code 128 Suppress Code Set C (Code Sets A and B only) -[zint -b CODE128AB -d "130170X178"] - It is sometimes advantageous to stop Code 128 from using Code Set C which compresses numerical data. The BARCODE_CODE128AB[19] 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 -[zint -b GS1_128 --compliantheight -d "[01]98898765432106[3202]012345[15]991231" -] - A variation of Code 128 previously known as UCC/EAN-128, this symbology is defined by the GS1 General Specifications. Application Identifiers (AIs) should be entered using [square bracket] notation. These will be converted to parentheses (round brackets) for the Human Readable Text. This method allows the inclusion of parentheses in the AI data without escaping. +[zint -b GS1_128 --compliantheight -d "[01]98898765432106[3202]012345[15]991231" +] + For compatibility with data entry in other systems, the option --gs1parens (API input_mode |= GS1PARENS_MODE) may be used to signal that AIs are encased in parentheses. If there are any opening parentheses in the AI data, they must be @@ -3243,25 +3260,23 @@ 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: - zint -b 16 -d "[01]98898765432106[3202]012345[15]991231" + zint -b GS1_128 -d "[01]98898765432106[3202]012345[15]991231" or using the --gs1parens option: - zint -b 16 --gs1parens -d "(01)98898765432106(3202)012345(15)991231" + zint -b GS1_128 --gs1parens -d "(01)98898765432106(3202)012345(15)991231" 6.1.10.4 EAN-14 -[zint -b EAN14 --compliantheight -d "9889876543210"] - 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. -6.1.10.5 NVE-18 (SSCC-18) +[zint -b EAN14 --compliantheight -d "9889876543210"] -[zint -b NVE18 --compliantheight -d "37612345000001003"] +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 @@ -3270,23 +3285,27 @@ 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"] -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. - 6.1.10.7 DPD Code +Another variation of Code 128 as used by DPD (Deutscher Paketdienst). + [zint -b DPD --compliantheight -d "000393206219912345678101040"] -Another variation of Code 128 as used by DPD (Deutscher Paketdienst). 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: +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 Tracking Number Service Destination Country @@ -3319,35 +3338,37 @@ height. In this case, an input of 27 alphanumeric characters is required. 6.1.10.8 UPU S10 -[zint -b UPU_S10 --compliantheight -d "EE876543216CA"] - 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 are due to -replace GS1-128 symbols in accordance with the GS1 General Specifications. If a -GS1 DataBar symbol is to be printed with a 2D component as specified in ISO/IEC -24723 set --mode=2 (API option_1 = 2). See 6.3 GS1 Composite Symbols (ISO 24723) -to find out how to generate DataBar symbols with 2D components. +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 -[zint -b DBAR_OMN --compliantheight -d "0950110153001"] - 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. @@ -3356,8 +3377,6 @@ produce a GS1 DataBar Truncated symbol set the symbol height to a value between 6.1.11.2 GS1 DataBar Limited -[zint -b DBAR_LTD --compliantheight -d "0950110153001"] - 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 @@ -3366,10 +3385,9 @@ 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. -6.1.11.3 GS1 DataBar Expanded +[zint -b DBAR_LTD --compliantheight -d "0950110153001"] -[zint -b DBAR_EXP --compliantheight -d "[01]98898765432106[3202]012345[15]991231 -"] +6.1.11.3 GS1 DataBar Expanded Previously 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 @@ -3378,24 +3396,25 @@ encoding data from a number of AIs in a single symbol. AIs should be encased in parentheses in the AI data without escaping. The AIs may alternatively be encased in parentheses using the --gs1parens switch - see 6.1.10.3 GS1-128. +[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: - zint -b 31 -d "[01]98898765432106[3202]012345[15]991231" + zint -b DBAR_EXP -d "[01]98898765432106[3202]012345[15]991231" 6.1.12 Korea Post Barcode -[zint -b KOREAPOST -d "923457"] - The Korean Postal Barcode is used to encode a 6-digit number and includes one check digit. -6.1.13 Channel Code +[zint -b KOREAPOST -d "923457"] -[zint -b CHANNEL -d "453678" --compliantheight] +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 @@ -3403,6 +3422,8 @@ 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" --compliantheight] + The maximum values permitted depend on the number of channels used as shown in the table below: @@ -3419,8 +3440,6 @@ the table below: 6.1.14 BC412 (SEMI T1-95) -[zint -b BC412 -d "AQ45670" --compliantheight] - 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 @@ -3428,6 +3447,8 @@ 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" --compliantheight] + 6.2 Stacked Symbologies 6.2.1 Basic Symbol Stacking @@ -3468,13 +3489,13 @@ demonstrated by the symbologies below. 6.2.2 Codablock-F -[zint -b CODABLOCKF -d "CODABLOCK F Symbology" --rows=3] - 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=3] + The 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 @@ -3486,8 +3507,6 @@ check digit to the encoded data. 6.2.3 Code 16K (EN 12323) -[zint -b CODE16K --compliantheight -d "ab0123456789"] - 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 @@ -3496,15 +3515,17 @@ 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) +[zint -b CODE16K --compliantheight -d "ab0123456789"] -[zint -b PDF417 -d "PDF417"] +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 @@ -3531,15 +3552,13 @@ If an ID is not given, no ID is encoded. 6.2.5 Compact PDF417 (ISO 15438) -[zint -b PDF417COMP -d "PDF417"] - 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) +[zint -b PDF417COMP -d "PDF417"] -[zint -b MICROPDF417 -d "12345678"] +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 @@ -3548,54 +3567,62 @@ 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 -FAST_MODE and Structured Append the same as PDF417, for which see details. +[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) -6.2.7.1 GS1 DataBar Stacked +The following are stacked counterparts of those in 6.1.11 GS1 DataBar (ISO +24724), GS1 DataBar Limited excluded. -[zint -b DBAR_STK --compliantheight -d "9889876543210"] +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. It can be generated with a two-dimensional component to make a -composite symbol. +required. + +[zint -b DBAR_STK --compliantheight -d "9889876543210"] 6.2.7.2 GS1 DataBar Stacked Omnidirectional -[zint -b DBAR_OMNSTK --compliantheight -d "9889876543210"] - 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. This symbol -can be generated with a two-dimensional component to make a composite symbol. +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]991 231"] -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. 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 such symbols the +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 -[zint -b CODE49 --compliantheight -d "MULTIPLE ROWS IN 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 @@ -3603,6 +3630,8 @@ 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 @@ -3682,49 +3711,47 @@ followed by 1, 2 or 3 for CC-A, CC-B or CC-C respectively. 6.3.1 CC-A -[zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=1 --primary=331234 -567890] - 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 or an alphanumeric string of shorter length. To select CC-A use --mode=1 (API option_1 = 1). -6.3.2 CC-B - -[zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=2 --primary=331234 +[zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=1 --primary=331234 567890] +6.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). -6.3.3 CC-C +[zint -b EAN13_CC --compliantheight -d "[99]1234-abcd" --mode=2 --primary=331234 +567890] -[zint -b GS1_128_CC --compliantheight -d "[99]1234-abcd" --mode=3 --primary="[01 -]03312345678903"] +6.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 -[zint -b PHARMA_TWO --compliantheight -d "29876543"] - 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. -6.4.2 POSTNET +[zint -b PHARMA_TWO --compliantheight -d "29876543"] -[zint -b POSTNET --compliantheight -d "12345678901"] +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 @@ -3734,9 +3761,9 @@ 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. -6.4.3 PLANET +[zint -b POSTNET --compliantheight -d "12345678901"] -[zint -b PLANET --compliantheight -d "4012345235636"] +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 @@ -3746,23 +3773,25 @@ 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. -6.4.4 Brazilian CEPNet +[zint -b PLANET --compliantheight -d "4012345235636"] -[zint -b CEPNET --compliantheight -d "12345678"] +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. -6.4.5 DX Film Edge Barcode +[zint -b CEPNET --compliantheight -d "12345678"] -[zint -b DXFILMEDGE --compliantheight -d "112-1/10A"] +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 @@ -3789,16 +3818,18 @@ A parity bit is automatically added by Zint. 6.5.1.1 Customer Barcodes -[zint -b AUSPOST --compliantheight -d "96184209"] - 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. +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 Required Input Format Symbol FCC Encoding @@ -3819,36 +3850,34 @@ shown in the following table. 6.5.1.2 Reply Paid Barcode -[zint -b AUSREPLY --compliantheight -d "12345678"] - A Reply Paid version of the Australia Post 4-State Barcode (FCC 45) which requires an 8-digit DPID input. -6.5.1.3 Routing Barcode +[zint -b AUSREPLY --compliantheight -d "12345678"] -[zint -b AUSROUTE --compliantheight -d "34567890"] +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. -6.5.1.4 Redirect Barcode +[zint -b AUSROUTE --compliantheight -d "34567890"] -[zint -b AUSREDIRECT --compliantheight -d "98765432"] +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. -6.5.2 Dutch Post KIX Code +[zint -b AUSREDIRECT --compliantheight -d "98765432"] -[zint -b KIX --compliantheight -d "2500GG30250"] +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. -6.5.3 Royal Mail 4-State Customer Code (RM4SCC) +[zint -b KIX --compliantheight -d "2500GG30250"] -[zint -b RM4SCC --compliantheight -d "W1J0TR01"] +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 @@ -3856,15 +3885,18 @@ 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 "1100000000000XY11"] -Developed in 2014 as a replacement for RM4SCC this 4-state symbol includes Reed- -Solomon error correction. 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. +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 Class Supply Chain ID Item ID Destination+DPS @@ -3899,15 +3931,17 @@ Mailmark (CMDM) (Data Matrix). 6.5.5 USPS Intelligent Mail -[zint -b USPS_IMAIL --compliantheight -d "01234567094987654321-01234"] - 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. 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: +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" @@ -3916,23 +3950,25 @@ all of the following inputs are valid data entries: 6.5.6 Japanese Postal Code -[zint -b JAPANPOST --compliantheight -d "15400233-16-4-205"] - 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. -6.5.7 DAFT Code +[zint -b JAPANPOST --compliantheight -d "15400233-16-4-205"] -[zint -b DAFT -d "AAFDTTDAFADTFTTFFFDATFTADTTFFTDAFAFDTF" --height=8.494 --vers= -256] +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. The 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%). +are invalid. + +[zint -b DAFT -d "AAFDTTDAFADTFTTFFFDATFTADTTFFTDAFAFDTF" --height=8.494 --vers= +256] + +The 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 @@ -3948,17 +3984,19 @@ as 6.6.1 Data Matrix (ISO 16022) -[zint -b HIBC_DM -d "/ACMRN123456/V200912190833" --fast --square] - 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. Data 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. +of data in a small area. + +[zint -b HIBC_DM -d "/ACMRN123456/V200912190833" --fast --square] + +Data 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 ------- ------------- -- ------- ------------- -- ------- ------------- @@ -4095,10 +4133,11 @@ 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=5] -Also known as Quick Response Code this symbology was developed by Denso. Four -levels of error correction are available using the --secure option (API +Four 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 @@ -4167,14 +4206,16 @@ be done outside of Zint. 6.6.4 Micro QR Code (ISO 18004) -[zint -b MICROQR -d "01234567"] - 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. 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. +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 @@ -4226,14 +4267,15 @@ 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) -[zint -b RMQR -d "0123456"] - 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. 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. +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 ------- ----------- --------------------------- ------------------- @@ -4299,34 +4341,38 @@ option_3 = ZINT_FULL_MULTIBYTE. 6.6.6 UPNQR (Univerzalnega Plačilnega Naloga QR) -[zint -b UPNQR -i upn_utf8.txt --quietzones] - 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. UPNQR 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). +need to be specified. + +[zint -b UPNQR -i upn_utf8.txt --quietzones] + +UPNQR 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: - zint -o upnqr.png -b 143 --scale=3 --binary -i upn.txt + zint -o upnqr.png -b UPNQR --scale=3 --binary -i upn.txt -A mask may be manually specified or the --fast option used as with QRCODE. +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 S T\GNY\GNY\R\E" --esc --primary="152382802000000" --scmvv=96] -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. MaxiCode 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. +MaxiCode 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 @@ -4348,7 +4394,7 @@ 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: - zint -o test.eps -b 57 --primary="999999999840012" \ + zint -o test.eps -b MAXICODE --primary="999999999840012" \ -d "Secondary Message Here" When using the API the primary message must be placed in the primary string. The @@ -4361,7 +4407,7 @@ 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 57 --primary="152382802840001" --scmvv=96 --esc -d \ + 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 @@ -4371,7 +4417,7 @@ 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: - zint -o test.eps -b 57 --mode=4 -d "A MaxiCode Message in Mode 4" + zint -o test.eps -b MAXICODE --mode=4 -d "A MaxiCode Message in Mode 4" Mode 6 is reserved for the maintenance of scanner hardware and should not be used to encode user data. @@ -4411,20 +4457,22 @@ 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"] -Invented by Andrew Longacre at Welch Allyn Inc in 1995 the Aztec Code symbol is -a matrix symbol with a distinctive bullseye 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: +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, mutally exclusive, are available to change this behaviour: -The size of the symbol can be specified using the --vers option (API option_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. +1) The size of the symbol can be specified using the --vers option (API + option_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 ------- ------------- -- ------- ------------- -- ------- ------------- @@ -4445,10 +4493,12 @@ a smaller bullseye 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. +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 --secure option (API option_1) to a value from the following table. +2) Alternatively the amount of error correction data can be specified by + setting the --secure option (API option_1) to a value from the following + table. Mode Error Correction Capacity ------ --------------------------- @@ -4475,22 +4525,24 @@ contain spaces. If an ID is not given, no ID is encoded. 6.6.9 Aztec Runes (ISO 24778) -[zint -b AZRUNE -d "125"] - 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. -6.6.10 Code One +[zint -b AZRUNE -d "125"] -[zint -b CODEONE -d "1234567890123456789012"] +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. 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: +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 Alphanumeric @@ -4529,9 +4581,6 @@ data nor for Version S symbols. 6.6.11 Grid Matrix -[zint -b GRIDMATRIX --eci=29 -d "AAT2556 电池充电器+降压转换器 200mA至2A tel:86 019 825127 -38"] - 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 @@ -4539,6 +4588,9 @@ 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 825127 +38"] + 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 @@ -4577,8 +4629,6 @@ Structured Append) (API structapp). The ID ranges from 0 (default) to 255. 6.6.12 DotCode -[zint -b DOTCODE -d "[01]00012345678905[17]201231[10]ABC123456" --gs1] - 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 @@ -4589,6 +4639,8 @@ 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" --gs1] + DotCode 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 @@ -4601,14 +4653,14 @@ does not support specifying an ID. 6.6.13 Han Xin Code (ISO 20830) -[zint -b HANXIN -d "Hanxin Code symbol"] - 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. @@ -4675,11 +4727,13 @@ 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"] -This symbology uses a grid of coloured elements to encode data. ECI and GS1 -modes are supported. The amount of error correction can be set using the ---secure option (API option_1) to a value as shown in the following table. +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 ------- ---------- ------------------------------------------------ @@ -4719,11 +4773,13 @@ not given, no ID is encoded. 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"] -Used by the United States Postal Service (USPS), the FIM symbology is used to -assist automated mail processing. There are only 5 valid symbols which can be -generated using the characters A-E as shown in the table below. +There are only 5 valid symbols which can be generated using the characters A-E +as shown in the table below. Code Letter Usage ------------- ---------------------------------------------------------------- @@ -4738,13 +4794,13 @@ generated using the characters A-E as shown in the table below. 6.7.2 Flattermarken -[zint -b FLAT -d "1304056"] - 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"] + 7. Legal and Version Information 7.1 License diff --git a/docs/templates/styles.html b/docs/templates/styles.html index 5c543dcd..bce2c0c0 100644 --- a/docs/templates/styles.html +++ b/docs/templates/styles.html @@ -160,7 +160,6 @@ $endif$ font-size: 90%; margin: 0; hyphens: manual; - color: #000000; } pre { margin: 1em 0; @@ -180,8 +179,7 @@ pre code { overflow: visible; } div.sourceCode { - background-color: #f7f7f7; - padding: 0.3em 0; + padding: 0.3em 1em; } aside.footnotes { font-size:90%;