Windows: Barcode command line interface (CLI)

Generate barcodes at the command line

Generate barcodes at the command lineYou can use the ActiveBarcode command line tool to create barcode images files directly from the command line. E.g. use it in batch or script programs.

The command line tool is included with ActiveBarcode and will be installed automatically when you install ActiveBarcode, unless you have unchecked this option. You'll find ActiveBarcodeCLI.exe in the folder you installed ActiveBarcode to. Usually: C:\Program Files\ActiveBarcode.

Highly accurate barcodes
Highly accurate barcodes
At the command line
At the command line
Bitmaps and vector graphics
Bitmaps and vector graphics
Versatile in use
Versatile in use


Barcode exampleThe following call of the tool will create a 400x200 pixels sized PNG image file named ean.png with an EAN-13 barcode encoding 192837465012.
ActiveBarcodeCLI ean.png -text=192837465012 -typename=ean13 -width=400 -height=200
One more example: The following call of the tool will create a 500x100 pixels sized PNG image file named code128.bmp with an Code 128 barcode encoding Hello World.
ActiveBarcodeCLI code128.bmp "-text=Hello World" -type=14 -width=500 -height=100

Command line parameters for the console

ActiveBarcodeCLI filename [Parameter]
The following parameters can be used:


Example: -text=123456789012
Characters to be encoded.
You can enter control codes in human readable form like this: <CR>, <LF>, ...
ActiveBarcodeCLI gs1.png "-text=(02)00614141000418(15)210228(10)451214<FNC1>(37)20" -type=28

If you want to use the quotation mark within the text, you need to send it as ASCII code because it is also used as delimiter for parameters. You can enter any ASCII character as decimal ASCII code within angle brackets in the form <nnn>.

The quotation mark is ASCII 34, so just pass <034> instead.
Example to encode ABC"123:
ActiveBarcodeCLI test.png "-text=ABC<034>123" -type=14


Example: -type=0
Barcode type, referenced by an indexed number


Example: -typename=CODECODE128
Barcode type, referenced by the name


Example: -width=500
Width in pixels


Example: -height=500
Height in pixels


Example: -alignment=1


Example: -borderwidth=10
Borderwidth in pixels


Example: -borderheight=1
Borderheight in pixels


Example: -notchheightinpercent=25
The notch height in %


Example: -showtext=off
No textline under the code


Example: -foreground=000000 or -foreground=black
Sets the foreground color, hexadecimal RGB as RRGGBB
or with CSS/HTML color names


Example: -background=FFFFFF or -background=white
Sets the background color, hexadecimal RGB as RRGGBB
or with CSS/HTML color names


Example: -fontname=arial
Font for the text line


Example: -fontsize=8
Font size


Example: -fontbold=on
Font bold (on/off)


Example: -fontitalic=on
Font italic (on/off)


Example: -fontunderline=on
Font underline (on/off)


Example: -fontstrikeout=on
Font strikeout (on/off)


Example: -filetype=bmp
The format of the image file determines i.a. whether the barcode is generated as raster graphics or freely scalable vector graphics.
(valid values: bmp, jpg, png, tif, tga, gif, wbm, pbm, pgm, ppm, xpm, wmf, emf)
Default: auto detect by extension of filename


Example: -colordepth=24
Colordepth of the image file
(valid values: 1, 8, 16, 24, 36)


Example: -flags=0x80


Example: -angle=180
Rotates the image file
(valid values: 0-359)


Example: -dpi=300
Resolution in DPI for jpg, png, tif & bmp files


Example: -echo=off
off: Display no messages
errors: Display only errors
verbose: Display all messages and open barcode in ImageView