We use cookies to provide you with the best experience and functionality on our website. By continuing to use the site, you are agreeing to our use of cookies.   

Barcode command line

Generate bar codes 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. Barcodes an der Kommandozeile

The commandline tool is included in the ActiveBarcode program package. When you setup ActiveBarcode to your system, the commandline tool also will be installed. You can find the tool named barcodeimage.wsf in the folder you installed ActiveBarcode to. General this is c:\programs\ActiveBarcode.

An 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".
barcodeimage 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".
barcodeimage code128.bmp "text=Hello World" type=14 width=500 height=100
Powershell: If you want to use 'barcodeimage' with the Microsoft Windows PowerShell, you have to call it using 'cscript'. See this example:
cscript barcodeimage.wsf code128.bmp "text=Hello World" type=14 width=500 height=100

Command line parameters for the console

barcodeimage filename [Parameter]

Parameter Description Example
-text= text to be encoded
You can enter some control codes in human readable form1: <CR>, <LF>, <TAB>, <ESC>, <DEL>, <BS>, <VT>, <FF>, <FNC3>
-type= barcode type, referenced by an indexed number -type=0
-width= width in pixels -width=500
-height= height in pixels -height=500
-alignment= Alignment
-borderwidth= borderwidth in pixels -borderwidth=10
-borderheight= borderheight in pixels -borderheight=1
-notchheightinpercent= the notch height in % -notchheightinpercent=25
-showtext=off no textline under the code -showtext=off
-forecolor= sets the foreground color
hexadecimal RGB as RRGGBB
(example is black)
-backcolor= sets the background color
hexadecimal RGB as RRGGBB
(example is white)
-fontname= font for the text line -fontname=arial
-fontsize= font size -fontsize=8
-fontbold= font bold (on/off) -fontbold=on
-fontitalic= font italic (on/off) -fontitalic=on
-fontunderline= font underline (on/off) -fontunderline=on
-fontstrikeout= font strikeout (on/off) -fontstrikeout=on
-filetype= file type of image
(valid values: bmp, jpg, png, tif, tga, gif, wbm, pbm, pgm, ppm, xpm, wmf, emf)
Default: auto detect by extension of filename
-colordepth= colordepth of the image file
(valid values: 1,8,16,24,36)
-flags= flags for the image file -flags=0x80
-angle= rotates the image file
(valid values: 0-359)
-dpi= resolution in DPI for jpg, png, tif & bmp files -dpi=300
-echo= off: display no messages
errors: display only errors
verbose:display all messages and open barcode in ImageView

When using ActiveBarcode Version 5.x, your version of this tool may not support these control codes. If so, please download the latest version of this AddOn here.

Search this site with Bing:
| Home | Shop | Download | E-Mail | Datenschutz | Imprint | Version 6.1.0 |
Web DesignszCWs
Web design & developement:

Frank HornActiveBarcode Generator App
Web design
Copyright Frank Horn
Lars SchenkActiveBarcode Object
Web- & server component
Command line
Copyright Lars Schenk

All trademarks and product names mentioned are the property of their respective owners.