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

EXIT STATUS

415       0      Success (including when given informational options -h | --help,
416              -e | --ecinos, -t | --types, -v | --version).
417
418       2      Invalid  option  given  but  overridden  by  Zint (ZINT_WARN_IN‐
419              VALID_OPTION)
420
421       3      Automatic ECI inserted by Zint (ZINT_WARN_USES_ECI)
422
423       4      Symbol created not compliant with  standards  (ZINT_WARN_NONCOM‐
424              PLIANT)
425
426       5      Input data wrong length (ZINT_ERROR_TOO_LONG)
427
428       6      Input data incorrect (ZINT_ERROR_INVALID_DATA)
429
430       7      Input check digit incorrect (ZINT_ERROR_INVALID_CHECK)
431
432       8      Incorrect option given (ZINT_ERROR_INVALID_OPTION)
433
434       9      Internal error (should not happen) (ZINT_ERROR_ENCODING_PROBLEM)
435
436       10     Error opening output file (ZINT_ERROR_FILE_ACCESS)
437
438       11     Memory allocation (malloc) failure (ZINT_ERROR_MEMORY)
439
440       12     Error writing to output file (ZINT_ERROR_FILE_WRITE)
441
442       13     Error  counterpart  of warning if --werror given (ZINT_ERROR_US‐
443              ES_ECI)
444
445       14     Error counterpart of warning if --werror given  (ZINT_ERROR_NON‐
446              COMPLIANT)
447

EXAMPLES

449       Create  “out.png”  (or  “out.gif” if zint built without PNG support) in
450       the current directory, as a Code 128 symbol.
451
452              zint -d 'This Text'
453
454       Create “qr.svg” in the current directory, as a QR Code symbol.
455
456              zint -b QRCode -d 'This Text' -o 'qr.svg'
457
458       Use batch mode to read from  an  input  file  “ean_nos.txt”  containing
459       13-digit  GTINs,  to create a series of EAN-13 barcodes, formatting the
460       output filenames to “ean001.gif”, “ean002.gif” etc.  using the  special
461       character “~”.
462
463              zint -b EANX --batch -i 'ean_nos.txt' -o 'ean~~~.gif'
464

BUGS

466       Please send bug reports to https://sourceforge.net/p/zint/tickets/.
467

SEE ALSO

469       Full  documention for zint (and the API libzint and the GUI zint-qt) is
470       available from
471
472                  https://zint.org.uk/manual/
473
474       and at
475
476                  https://sourceforge.net/p/zint/docs/manual.txt
477

CONFORMING TO

479       Zint is designed to be compliant with a number of  international  stan‐
480       dards, including:
481
482       ISO/IEC  24778:2008,  ANSI/AIM  BC12-1998,  EN  798:1996,  AIM ISS-X-24
483       (1995), ISO/IEC 15417:2007, EN 12323:2005, ISO/IEC 16388:2007, ANSI/AIM
484       BC6-2000,   ANSI/AIM   BC5-1995,  AIM  USS  Code  One  (1994),  ISO/IEC
485       16022:2006, ISO/IEC 21471:2019, ISO/IEC 15420:2009,  AIMD014  (v  1.63)
486       (2008),  ISO/IEC  24723:2010,  ISO/IEC  24724:2011, ISO/IEC 20830:2021,
487       ISO/IEC 16390:2007, ISO/IEC  16023:2000,  ISO/IEC  24728:2006,  ISO/IEC
488       15438:2015,  ISO/IEC  18004:2015,  ISO/IEC  23941:2022,  AIM ITS/04-023
489       (2022)
490
492       Copyright © 2022 Robin Stuart.  Released under GNU GPL 3.0 or later.
493

AUTHOR

495       Robin Stuart <robin@zint.org.uk>
496
497
498
499Version 2.12.0                   December 2022                         ZINT(1)
Impressum