Command line reference
options - options specified in this document. See option rules
sources - files, folders, or URLs identifying input files
configuration-file - zero one or more configurations files
The source parameter specifies the location of image files to read barcodes from. Multiple sources can be specified. Sources can be:
- Local image file
- Local folder
- Web-based image. The source name should start with http://, htpps://
The rules for source values are:
- The value of the source should use UTF-8 to represent non-English file names
- The value containing spaces should be enclosed in double quotes ("")
- The value containing environmental and user macro references expanded at runtime
- Most options are specified as -name=value, except:
- Options with a value described as a flag are specified as -name
- the -d option is specified as -d="macro.name=macro.value"
- If the value is described as a list, zero or more valid values can be set. Multiple values should be separated by a comma (,). No spaces are allowed in the list.
- All options (except -type) are optional.
- A new option value (except -output) replaces the previous value. An empty string value sets the option to its default value.
- For options specifying file names: -output and -output-text.
- If the value contains spaces, it should be enclosed in double quotes ("")
- Environmental and user macro references are expanded at runtime
The order of the options on the command line and in configuration files is important:
- Reader options and source options should be specified before the source parameter. Thus different options can be applied to individual sources.
- Output options that apply to output should be specified before the -output option. Thus, different options can be applied to individual outputs.
Reader options configure the barcode reader parameters to be applied to a source.
Required. List of barcode types
code39 code128 ucc128 pdf417 qr datamatrix drvlic
code39 code128 codabar ucc128 code93 upca ean8 upce ean13 i25 datamatrix pdf417 qr drvlic imb bpo aust sing 4state patch
List of TBR Codes
Valid TBR codes for a given type are displayed by the TBR Wizard
List of barcode directions
all horz vert
A maximum number of barcodes to read on a page. 0 means read all barcodes.
0 - 100
Barcode reading timeout in seconds. 0 means no timeout.
Encoding to convert barcode data to UTF-8 text. See here
- Valid codes for specific barcode types are reported in the TBR Wizard
- Each TBR code set in -tbr option (if more than one) is applied sequentially to each source page. If the number of barcodes found on a page after applying a TBR code from the list is equal to or more than -max-bc value (if set), the rest of the TBR codes are ignored for this page.
If -tbr option is not set, the default algorithm is used. If TBR codes are changed, to return to the default algorithm to the next source set -tbr=0
This option control processing of multi-page file formats: PDF, TIFF, GIF
List of page selectors to limit reading to a set of pages. NMB is an explicit page number (1-based) START is an explicit page number or first STOP is an explicit page number or last CNT is the maximum number of barcodes to detect in a file
all even odd first last NMB START-STOP maxbc:CNT
If the page range is maxbc:CNT and the value of CNT > 0, then file processing stops once CNT barcodes are found.
Setting a barcode count limit might increase overall processing time since multi-threading is disabled.
Images from http://, htpps:// sources are downloaded by the curl command-line application.
- Linux version is installed with the BarcodeReaderCLI.
- Windows version is available here and should be installed in the PATH.
The curl is invoked with the following default curl options: -s -S -D -m -o -L
- Additional options should be set as needed based on the system requirements.
- BarcodeReaderCLI reports errors returned from the curl.
- To resolve any problems invoke curl from the command line to identify required curl options.
Total timeout in seconds to download an image with curl. A value of 0.0 disables the timeout.
Floating point number
Additional curl options. The list of options should be enclosed in the double quotes (""). Use an escape character before any double quotes in the list.
Disable request redirect
These options control the selection of image files when the source is a folder.
Include subfolders of the source folder in the processing
List of file name masks to be included in the processing
List of file name masks to be excluded from processing
These options control the output generated by BarcodeReaderCLI.
File path - output is sent to the specified file. Zero or more output files can be specified, each requires a separate -output option entry console - output is sent to stdout using -format option.
Console output format, text value requires --output-text option to be specified.
json csv text bin
String with macro reference. To define text output in a file, the string should be file://text-file-path, where text-file-path is a template file path.
Action to take if the output file already exists: overwrite replaces the existing file append adds new data to an existing file (not allowed for bin output) unique adds a unique file index to the filename before the extension error generates a runtime error
overwrite append unique error
Fields to output in json and csv output. Fields values are obtained through macro expansion except: barcode outputs all default fields
For Driver License Barcodes: Fields to output in json and csv output. Fields values are obtained through macro expansion except: drvlic outputs all default fields.
last,first,middle,dob,eyes,hair, sex,height,weight, street,city,state,postal,id,issued, expires
Flag to output command-line help to console. No processing is done.
Silent mode flag. Do not output the BarcodeReaderCLI version and information
Execution timeout in seconds. The default value of 0.0 disables the timeout. Error is returned if total execution time exceeds timeout.
Command line use macros. The format is -d="macro.name=macro.value"
A configuration file is a convenient way to define a set of options and/or sources shared by multiple systems or sessions. For example, they can be used to:
- Define macros specific to a system, such as the location of source or output files.
- Define reader options applied to sources specified on a command line.
Zero or more configuration files can be set on the command line. Multiple files are processed in the order of appearance. The format rules for configuration files are:
- -name sets command line flags
- -name=value sets command line options with values
- -d="macro.name=macro.value" specifies a command line use macros.
- source specifies the location of image files to read barcodes from. It can be an image file, a folder containing image files, or a URL. Values with spaces should be enclosed in double quotes ("some text")
- # starts the comment portion of a line. If # is the first character, the whole line is treated as a comment.
- exit ends the processing of a configuration file. The rest of the file is ignored.
- The configuration file should be in UTF-8 to include non-English file names.