Scroll to navigation



barcode - a standalone program to convert text strings to printed bars


barcode [[-b - | string] | [-i - | input_file]] [-e encoding] [-o - | outfile] [ other-flags ]


This manual page documents briefly the barcode command as provided by barcode package.

GNU barcode is a standalone program that converts text strings to printed bars. It is able to read user supplied strings from the command line or a data file (standard input by default) and encode all of them.


barcode accepts the following options:

Print a usage summary and exit.
Specify input file (strings to encode), default is stdin
Specify output file, default is stdout
Specify string to encode (use input file if missing)
Specify encoding type (default is best fit for first string)
Specify unit to be used ("mm", "in", ...). This option is used to decode -g, -t and -p.
Specify geometry on the page: [<wid>x<hei>][+<margin>+<margin>]
Specify table geometry: <cols>x<lines>[+<margin>+<margin>]
Specify internal margin for each item in a table: <xm>[,<ym>]
Be "numeric": avoid printing text along with the bars
no Checksum character, if the chosen encoding allows it
Print one code as eps file (default: multi-page ps)
Print one code as svg file (default: multi-page ps)
Create PCL output instead of postscript
Specify page size. Please refer to texinfo doc for more information.
Use streaming mode. Please refer to texinfo doc for more information.


The program encodes text strings passed either on the command line (with -b) or retrieved from standard input. The text representation is interpreted according to certain rules. Please refer to texinfo doc as described below for detail introduction.

To get a list of supported encoding type names, please call the program with "-h" option.


Please mail bug reports and suggestions to or submit them onto its Bug Tracker on .

Please report Debian-specific bugs using Debian Bug Tracking System.


Full documentation of GNU barcode is available as a texinfo document provided by the authors. Please call info barcode to read it after having GNU Info documentation reader installed.

Project homepage:


Alessandro Rubini(maintainer)
Leonid A. Broukhis(several encodings)
Andrea Scopece(PCL output)

This manual page is written by Boyuan Yang for the Debian Project (but may be used by others).

2018-12-25 Debian