Barcode Reader CLI
Command line examples
Read code39 barcode. Output is the default JSON format:
BarcodeReaderCLI -type=code39 "your_file.tif"
Read code39 barcode. Output just text value to the console:
BarcodeReaderCLI -type=code39 "your_file.tif" -format=text --output-text="{text}"
Read barcodes from Web-based images. Read from multiple images with a single call, each reading a different barcode type.
BarcodeReaderCLI -type=pdf417 "https://your_site/your_file.jpg" -type=code39 "https://your_side/your_file.pdf"
BarcodeReaderCLI @"brcli-example.config"
BarcodeReaderCLI -type=drvlic "your_file.pdf"
Read barcodes in a folder and sub-folders. Limit file types to BMP and PDF
BarcodeReaderCLI -type=pdf417 -sub -incl="*.bmp *.pdf" "your_folder"
Read using TBR Code 120
BarcodeReaderCLI -type=datamatrix -tbr=120 "your_file.bmp"
Processing is configured in encoding.config file. Features in this example
- Read multiple barcode types set in -type= option.
- Output results to multiple files with output= options (JSON, CSV, and TEXT files)
- Output to text files using thetemplate.txt file, configure with -output-text= option.
- Limit type date in the output with -fields= option
- Define macros with -d= option and expanding
- Use -encoding= option to convert barcode values to localized text
BarcodeReaderCLI @"encoding.config" -output=console
encoding.config
template.txt
1# ============ OPTIONS
2-type=pdf417,qr,datamatrix
3
4# ============ INPUT
5-d="SRCDIR=images/encoding/"
6-d="OUTDIR={path.tmp}/brcli/"
7
8"{SRCDIR}QR.UTF8.japanese.プライバシーマーク.png"
9
10# =========== Read language-encoded barcodes
11# USE 'encoding' to get UTF8 text
12-encoding=CP1256
13"{SRCDIR}DM.CP1256.arabic.بساطة لأنه الأل.tif"
14
15-encoding=BIG5
16"{SRCDIR}PDF417.big5.Chinese.包含一杯准饮料.bmp"
17
18-encoding=CP1251
19"{SRCDIR}PDF417.cp1251.russian.ЙшзщЪфг.bmp"
20
21# ============== Read UTF8-encoded barcodes in various languages
22-encoding= # Disable encoding
23"{SRCDIR}PDF417.UTF8.pdf"
24
25# ============ OUPUT
26# Select fields in output files
27-fields=text,type,path,encoding
28
29# Set output files
30-output="{OUTDIR}utf8.json"
31-output="{OUTDIR}utf8.csv"
32
33# Set format for TEXT output
34-output-text="./template.txt"
35-output="{OUTDIR}utf8.txt"