Barcode command line interface (CLI)

Generate barcodes at the command line

Generate barcodes at the command line You 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
Automation
Automation
Versatile in use
Versatile in use

Examples

Barcode example The 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

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

-text=


Example: -text=123456789012
characters to be encoded.
You can enter control codes in human readable form like this: {CR}, {LF}, ...

-type=


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

-typename=


Example: -type=CODECODE128
barcode type, referenced by the name

-width=


Example: -width=500
width in pixels

-height=


Example: -height=500
height in pixels

-alignment=


Example: -alignment=1
Alignment
0=left
1=center
2=right

-borderwidth=


Example: -borderwidth=10
borderwidth in pixels

-borderheight=


Example: -borderheight=1
borderheight in pixels

-notchheightinpercent=


Example: -notchheightinpercent=25
the notch height in %

-showtext=off


Example: -showtext=off
no textline under the code

-forecolor=


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

-backcolor=


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

-fontname=


Example: -fontname=arial
font for the text line

-fontsize=


Example: -fontsize=8
font size

-fontbold=


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

-fontitalic=


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

-fontunderline=


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

-fontstrikeout=


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

-filetype=


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

-colordepth=


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

-flags=


Example: -flags=0x80
flags for the image file

-angle=


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

-dpi=


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

-echo=


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