1zint(1)                                                                zint(1)
2
3
4

NAME

6       zint - Encode data as a barcode image
7

SYNOPSIS

9       zint [-h | --help]
10       zint [options]
11

DESCRIPTION

13       zint  takes  input  data from the command line or a file to encode in a
14       barcode which is then output to an image file.
15
16       Input data is UTF-8, unless --binary is specified.
17
18       Human Readable Text (HRT) is displayed by default  for  those  barcodes
19       that support HRT, unless --notext is specified.
20
21       The  output image file (specified with -o or --output) may be in one of
22       these formats: Windows Bitmap (BMP), Enhanced  Metafile  Format  (EMF),
23       Encapsulated PostScript (EPS), Graphics Interchange Format (GIF), ZSoft
24       Paintbrush (PCX), Portable Network Format (PNG), Scalable Vector Graph‐
25       ic (SVG), or Tagged Image File Format (TIF).
26

OPTIONS

28       -h, --help
29              Print usage information summarizing command line options.
30
31       -b TYPE, --barcode=TYPE
32              Set  the barcode symbology that will be used to encode the data.
33              TYPE is the number or name of the  barcode  symbology.   If  not
34              given,  the  symbology  defaults  to 20 (Code 128).  To see what
35              types are available, use the -t or --types option.   Type  names
36              are case-insensitive, and non-alphanumerics are ignored.
37
38       --addongap=INTEGER
39              For  UPC/EAN  symbologies, set the gap between the main data and
40              the add-on.  INTEGER is in integral multiples  of  the  X-dimen‐
41              sion.  The maximum gap that can be set is 12.  The minimum is 7,
42              except for UPC-A, when the minimum is 9.
43
44       --batch
45              Treat each line of an input file specified with -i or --input as
46              a  separate  data  set and produce a barcode image for each one.
47              The barcode images are outputted by default  to  numbered  file‐
48              names  starting with “00001.png”, “00002.png” etc., which can be
49              changed by using the -o or --output option.
50
51       --bg=COLOUR
52              Specify a background (paper) colour where COLOUR is in hex RRGG‐
53              BB or RRGGGAA format.
54
55       --binary
56              Treat input data as raw 8-bit binary data instead of the default
57              UTF-8.  Automatic code page translation to an ECI page  is  dis‐
58              abled,  and no validation of the data’s character encoding takes
59              place.
60
61       --bind Add horizontal boundary bars (also known as bearer bars) to  the
62              symbol.  The width of the boundary bars must be specified by the
63              --border option.  --bind can also be used to add  row  separator
64              bars  to  symbols  stacked with multiple -d or --data inputs, in
65              which case the width of the separator  bars  must  be  specified
66              with the --separator option.
67
68       --bold Use bold text for the Human Readable Text (HRT).
69
70       --border=INTEGER
71              Set  the width of boundary bars (--bind) or box borders (--box),
72              where INTEGER is in integral multiples of the X-dimension.
73
74       --box  Add a box around the symbol.  The width of the borders  must  be
75              specified by the --border option.
76
77       --cmyk Use  the CMYK colour space when outputting to Encapsulated Post‐
78              Script (EPS) or TIF files.
79
80       --cols=INTEGER
81              Set the number of data columns in the symbol  to  INTEGER.   Af‐
82              fects   Codablock-F,   DotCode,  GS1  DataBar  Expanded  Stacked
83              (DBAR_EXPSTK), MicroPDF417 and PDF417 symbols.
84
85       --compliantheight
86              Warn if the height specified by the --height option is not  com‐
87              pliant  with  the barcode’s specification, or if --height is not
88              given, default to the height specified by the specification  (if
89              any).
90
91       -d, --data=DATA
92              Specify  the input DATA to encode.  The --esc option may be used
93              to enter non-printing characters using  escape  sequences.   The
94              DATA  should  be  UTF-8, unless the --binary option is given, in
95              which case it can be anything.
96
97       --direct
98              Send output to stdout, which in most cases should be re-directed
99              to a pipe or a file.  Use --filetype to specify output format.
100
101       --dmre For  Data Matrix symbols, allow Data Matrix Rectangular Extended
102              (RMRE) sizes when considering automatic sizes.
103
104       --dotsize=NUMBER
105              Set the radius of the dots in dotty mode (--dotty).   NUMBER  is
106              in multiples of the X-dimension, and may be floating-point.  The
107              default is 0.8.
108
109       --dotty
110              Use dots instead of squares for matrix symbols.  DotCode is  al‐
111              ways in dotty mode.
112
113       --dump Dump  a hexadecimal representation of the symbol’s encodation to
114              stdout.  The same representation may be outputted to a  file  by
115              using  a  .txt  extension  with  -o or --output or by specifying
116              --filetype=txt.
117
118       -e, --ecinos
119              Display the table of ECIs (Extended Channel Interpretations).
120
121       --eci=INTEGER
122              Set the ECI code for the input  data  to  INTEGER.   See  -e  or
123              --ecinos  for  a list of the ECIs available.  ECIs are supported
124              by Aztec Code, Code One, Data Matrix, DotCode, Grid Matrix,  Han
125              Xin  Code,  MaxiCode, MicroPDF417, PDF417, QR Code, rMQR and Ul‐
126              tracode
127
128       --esc  Process escape characters in the input  data.   The  escape  se‐
129              quences are:
130
131                     \0      (0x00)    NUL  Null character
132                     \E      (0x04)    EOT  End of Transmission
133                     \a      (0x07)    BEL  Bell
134                     \b      (0x08)    BS   Backspace
135                     \t      (0x09)    HT   Horizontal Tab
136                     \n      (0x0A)    LF   Line Feed
137                     \v      (0x0B)    VT   Vertical Tab
138                     \f      (0x0C)    FF   Form Feed
139                     \r      (0x0D)    CR   Carriage Return
140                     \e      (0x1B)    ESC  Escape
141                     \G      (0x1D)    GS   Group Separator
142                     \R      (0x1E)    RS   Record Separator
143                     \\      (0x5C)    \    Backslash
144                     \xNN    (0xNN)         Any 8-bit character where NN is
145                                            hexadecimal
146                     \uNNNN  (U+NNNN)       Any 16-bit Unicode BMP character
147                                            where NNNN is hexadecimal
148
149       --fast Use  faster  if  less optimal encodation (currently affects Data
150              Matrix only).
151
152       --fg=COLOUR
153              Specify a foreground (ink) colour where COLOUR is in hex  RRGGBB
154              or RRGGGAA format.
155
156       --filetype=TYPE
157              Set the output file type to TYPE, which is one of BMP, EMF, EPS,
158              GIF, PCX, PNG, SVG, TIF, TXT.
159
160       --fullmultibyte
161              Use the multibyte modes of Grid Matrix, Han Xin and QR Code  for
162              non-ASCII data.
163
164       --gs1  Treat  input  as  GS1  compatible data.  Application Identifiers
165              (AIs)  should  be  placed  in  square  brackets  "[]"  (but  see
166              --gs1parens).
167
168       --gs1nocheck
169              Do not check the validity of GS1 data.
170
171       --gs1parens
172              Process  parentheses  "()"  as  GS1  AI  delimiters, rather than
173              square brackets "[]".  The input data must not otherwise contain
174              parentheses.
175
176       --gssep
177              For Data Matrix in GS1 mode, use GS (0x1D) as the GS1 data sepa‐
178              rator instead of FNC1.
179
180       --guarddescent=INTEGER
181              For UPC/EAN symbols, set the height of the guard bars’  descent,
182              where INTEGER is in integral multiples of the X-dimension.
183
184       --height=NUMBER
185              Set  the  height  of the symbol in multiples of the X-dimension.
186              NUMBER may be floating-point.  Increments of 0.5 are recommended
187              for raster output (BMP, GIF, PCX, PNG and TIF).
188
189       --heightperrow
190              Treat height as per-row.  Affects Codablock-F, Code16K, Code 49,
191              GS1 DataBar  Expanded  Stacked  (DBAR_EXPSTK),  MicroPDF417  and
192              PDF417.
193
194       -i, --input=FILE
195              Read the input data from FILE.
196
197       --init Create a Reader Initialisation (Programming) symbol.
198
199       --mask=INTEGER
200              Set  the  masking pattern to use for DotCode, Han Xin or QR Code
201              to INTEGER, overriding the automatic selection.
202
203       --mirror
204              Use the batch data to  determine  the  filename  in  batch  mode
205              (--batch).
206
207       --mode=INTEGER
208              For MaxiCode and Composite symbols, set the encoding mode to IN‐
209              TEGER.
210
211              For MaxiCode (SCM is Structured Carrier Message, with 3  fields:
212              postcode,  3-digit  ISO  3166-1  country  code,  3-digit service
213              code):
214
215                     2   SCM with 9-digit numeric postcode
216                     3   SCM with 6-character alphanumeric postcode
217                     4   Enhanced ECC for the primary part of the message
218                     5   Enhanced ECC for all of the message
219                     6   Reader Initialisation (Programming)
220
221              For  Composite  symbols  (names  end   in   _CC,   i.e. EANX_CC,
222              GS1_128_CC, DBAR_OMN_CC etc.):
223
224                     1   CC-A
225                     2   CC-B
226                     3   CC-C (GS1_128_CC only)
227
228       --nobackground
229              Remove  the  background  colour (EMF, EPS, GIF, PNG, SVG and TIF
230              only).
231
232       --noquietzones
233              Disable any quiet zones for symbols that define them by default.
234
235       --notext
236              Remove the Human Readable Text (HRT).
237
238       -o, --output=FILE
239              Send the output to FILE.  When not in batch mode, the default is
240              “out.png”  (or  “out.gif”  if  zint  built without PNG support).
241              When in batch mode (--batch), special characters can be used  to
242              format the output filenames:
243
244                     ~           Insert a number or 0
245                     #           Insert a number or space
246                     @           Insert a number or *
247                     Any other   Insert literally
248
249       --primary=STRING
250              For  MaxiCode, set the content of the primary message.  For Com‐
251              posite symbols, set the content of the linear symbol.
252
253       --quietzones
254              Add compliant quiet zones for symbols that specify one.  This is
255              in  addition  to  any whitespace specified by -w or --whitesp or
256              --vwhitesp.
257
258       -r, --reverse
259              Reverse the foreground and background colours (white on black).
260
261       --rotate=INTEGER
262              Rotate the symbol by INTEGER degrees, where INTEGER  can  be  0,
263              90, 270 or 360.
264
265       --rows=INTEGER
266              Set the number of rows for Codablock-F or PDF417 to INTEGER.  It
267              will also set the minimum number of rows for Code  16k  or  Code
268              49,  and  the  maximum  number  of rows for GS1 DataBar Expanded
269              Stacked (DBAR_EXPSTK).
270
271       --scale=NUMBER
272              Set the X-dimension.  NUMBER may be floating-point.
273
274       --scmvv=INTEGER
275              For MaxiCode, prefix the Structured Carrier Message  (SCM)  with
276              "[)>\R01\Gvv", where vv is a 2-digit INTEGER.
277
278       --secure=INTEGER
279              Set the error correction level (ECC) to INTEGER.  The meaning is
280              specific to the following matrix symbols:
281
282                     Aztec Code  1 to 4 (10%, 23%, 36%, 50%) (approx.)
283                     Grid Matrix 1 to 5 (10% to 50%) (approx.)
284                     Han Xin     1 to 4 (8%, 15%, 23%, 30%) (approx.)
285                     Micro QR    1 to 3 (L, M, Q)
286                     PDF417      0 to 8 (2^(INTEGER + 1) codewords)
287                     QR Code     1 to 4 (L, M, Q, H)
288                     rMQR        2 or 4 (M, H)
289                     Ultracode   1 to 6 (0%, 5%, 9%, 17%, 25%, 33%) (approx.)
290
291       --segN=ECI,DATA
292              Set the ECI & DATA content for segment N, where N is 1 to 9.  -d
293              or  --data must still be given, and counts as segment 0, its ECI
294              given by --eci.  Segments must be consecutive.
295
296       --separator=INTEGER
297              Set the height of row separator bars  for  stacked  symbologies,
298              where INTEGER is in integral multiples of the X-dimension.
299
300       --small
301              Use small text for Human Readable Text (HRT).
302
303       --square
304              For  Data Matrix symbols, exclude rectangular sizes when consid‐
305              ering automatic sizes.
306
307       --structapp=I,C[,ID]
308              Set Structured Append info, where I is the 1-based index,  C  is
309              the count of total symbols in the sequence, and ID, which is op‐
310              tional, is the identifier  that  all  symbols  in  the  sequence
311              share.   Structured Append is supported by Aztec Code, Code One,
312              Data  Matrix,  DotCode,  Grid  Matrix,  MaxiCode,   MicroPDF417,
313              PDF417, QR Code and Ultracode.
314
315       -t, --types
316              Display  the  table of barcode types (symbologies).  The numbers
317              or names can be used with -b or --barcode.
318
319       --vers=INTEGER
320              Set the symbol version (size, check digits,  other  options)  to
321              INTEGER.  The meaning is symbol-specific.
322
323              For most matrix symbols, it specifies size:
324
325                     Aztec Code      1 to 36 (1 to 4 compact)
326                     Code One        1 to 10
327                     Data Matrix     1 to 48 (31 to 48 DMRE)
328                     Grid Matrix     1 to 13
329                     Han Xin         1 to 84
330                     Micro QR        1 to 4  (M1, M2, M3, M4)
331                     QR Code         1 to 40
332                     rMQR            1 to 38 (33 to 38 automatic width)
333
334              For a number of linear symbols, it specifies check character op‐
335              tions (“hide” or “hidden” means don’t show  in  HRT,  “show”  or
336              “visible” means do display in HRT):
337
338                     C25IATA         1 or 2 (add visible or hidden check digit)
339                     C25IND          ditto
340                     C25INTER        ditto
341                     C25LOGIC        ditto
342                     C25STANDARD     ditto
343                     Codabar         1 or 2 (add hidden or visible check digit)
344                     Code 11         0 or 1 (no or 1 check digit only)
345                                            (has 2 check digits by default)
346                     Code 39         1      (add visible check digit)
347                     Code 93         1      (hide the default check characters)
348                     EXCODE39        1      (add visible check digit)
349                     LOGMARS         1      (add visible check digit)
350                     MSI Plessey     0 to 6 (various check digit options)
351                                     +10    (hide)
352
353              For a few other symbologies, it specifies other characteristics:
354
355                     Channel Code    3 to 8    (no. of channels)
356                     DAFT            50 to 900 (permille tracker ratio)
357                     Ultracode       2         (revision 2)
358                     VIN             1         (add international prefix)
359
360       -v, --version
361              Display zint version.
362
363       --vwhitesp=INTEGER
364              Set  the  height of vertical whitespace above and below the bar‐
365              code, where INTEGER is in integral multiples of the X-dimension.
366
367       -w, --whitesp=INTEGER
368              Set the width of horizontal whitespace either side of  the  bar‐
369              code, where INTEGER is in integral multiples of the X-dimension.
370
371       --werror
372              Convert all warnings into errors.
373

EXIT STATUS

375       0      Success  (including when given informational options -h, --help,
376              -e, --ecinos, -t, --types, -v, --version).
377
378       2      Invalid option  given  but  overridden  by  Zint  (ZINT_WARN_IN‐
379              VALID_OPTION)
380
381       3      Automatic ECI inserted by Zint (ZINT_WARN_USES_ECI)
382
383       4      Symbol  created  not compliant with standards (ZINT_WARN_NONCOM‐
384              PLIANT)
385
386       5      Input data wrong length (ZINT_ERROR_TOO_LONG)
387
388       6      Input data incorrect (ZINT_ERROR_INVALID_DATA)
389
390       7      Input check digit incorrect (ZINT_ERROR_INVALID_CHECK)
391
392       8      Incorrect option given (ZINT_ERROR_INVALID_OPTION)
393
394       9      Internal error (should not happen) (ZINT_ERROR_ENCODING_PROBLEM)
395
396       10     Error opening output file (ZINT_ERROR_FILE_ACCESS)
397
398       11     Memory allocation (malloc) failure (ZINT_ERROR_MEMORY)
399
400       12     Error writing to output file (ZINT_ERROR_FILE_WRITE)
401
402       13     Error counterpart of warning if --werror  given  (ZINT_ERROR_US‐
403              ES_ECI)
404
405       14     Error  counterpart of warning if --werror given (ZINT_ERROR_NON‐
406              COMPLIANT)
407

EXAMPLES

409       Create “out.png” (or “out.gif” if zint built without  PNG  support)  in
410       the current directory, as a Code 128 symbol.
411
412              zint -d 'This Text'
413
414       Create “qr.svg” in the current directory, as a QR Code symbol.
415
416              zint -b QRCode -d 'This Text' -o 'qr.svg'
417
418       Use  batch  mode  to  read  from an input file “ean_nos.txt” containing
419       13-digit GTINs, to create a series of EAN-13 barcodes,  formatting  the
420       output  filenames to “ean001.gif”, “ean002.gif” etc.  using the special
421       character “~”.
422
423              zint -b EANX --batch -i 'ean_nos.txt' -o 'ean~~~.gif'
424

BUGS

426       Please send bug reports to https://sourceforge.net/p/zint/tickets/.
427

SEE ALSO

429       Full documention for zint (and the API libzint and the GUI zint-qt)  is
430       available  from  http://zint.org.uk/Manual.aspx, and at https://source
431       forge.net/p/zint/docs/manual.txt.
432

CONFORMING TO

434       Zint is designed to be compliant with a number of  international  stan‐
435       dards, including:
436
437       EN  798:1996,  EN  12323:2005,  ISO/IEC 15420:2009, ISO/IEC 15417:2007,
438       ISO/IEC 15438:2015, ISO/IEC  16022:2006,  ISO/IEC  16023:2000,  ISO/IEC
439       16388:2007, ISO/IEC 18004:2015, ISO/IEC 20830:2021, ISO/IEC 24723:2010,
440       ISO/IEC 24724:2011, ISO/IEC  24728:2006,  ISO/IEC  24778:2008,  ISO/IEC
441       16390:2007,  ISO/IEC  21471:2019,  AIM  USS  Code  One (1994), ANSI/AIM
442       BC12-1998, ANSI/AIM BC6-2000, ANSI/AIM BC5-1995, AIM  ISS-X-24  (1995),
443       AIMD014 (v 1.63) (2008), ANSI-HIBC 2.6-2016, AIM ITS/04-023 (2022)
444

AUTHORS

446       Robin Stuart <robin@zint.org.uk>
447
448
449
450Version 2.11.0                     May 2022                            zint(1)
Impressum