Barcode Reader CLI

Output

output destinations console output barcodereadercli generates output data written to the specified output file or to the console console output can be redirected to a file or piped to another application console output is generated if output=console output=console or no output output option is set console output is sent to stdout stdout all errors, diagnostics, versions, and help information are sent to stderr stderr the format format option defines the format of the console output the default is json if format=text format=text , then the output text output text option must be set if the output output option is not set, and the last values of the format format , fields fields , and output text output text options are applied to the console output output files the format of the output file is defined by the output file name extension json for a file with json extension csv for a file with csv extension bin for a file with bin extension text for a file with any other extension the output text output text option must be set if json , csv , or text file already exists, the output action depends on the value of if exists if exists option overwrite replaces the existing file append adds the new data to the existing file unique adds a unique index to the filename preceding the extension, i e , the modified filename becomes basename nnnn ext where nnnn is a unique file index error generates a runtime error multiple output files can be specified, each requiring a separate output output option value options fields fields , output text output text , if exists if exists , if set, should precede the output output option for their value to be applied to that output file different options can be specified before each output output options to create multiple, different outputs from the same session output formats output content (json, csv, text) content of json , and csv outputs is defined by the fields fields option csv format double quotes ( "" "" ) enclose barcode text values filenames containing spaces or commas the content of text outputs is defined by output text output text option text values are stored as utf 8 to represent non english values accurately if the barcode contains binary data, its text value is modified per json and csv format requirements if the output is appended to an existing file json format adds the object to "sessions" \[] array csv format append new rows the existing header row is not updated text format append new text bin output the output file contains a single barcode value as a byte array if the image contains multiple barcodes, a unique name is created to hold the output of each barcode for example some folder some folder /some prefix {filename} p{page} i{ind} t{type} bin bin output is not available for console output a bin output file can not be appended text output text format output is based on the macros docid\ lcj sxpqwhwur1q 9vvgz expansion by default, the output is initiated when a new barcode is read an event identifier must precede macro reference to trigger processing on a new event available event identifiers are event identifier event macros available for expansion \[onsesion] \[onsesion] after session started environment variables macros command line macros session macros \[onsource] \[onsource] source processing is completed all of the above + source macros \[onfile] \[onfile] image file processing is completed all of the above + file macros \[onpage] \[onpage] page processing is completed all of the above + page macros \[onbarcode] \[onbarcode] barcode is read all of the above + barcode macros \[ondrvlic] \[ondrvlic] barcode with driver's license data is read all of the above + driver license macros text outside of the macro reference is copied to the output as is example 1 output each barcode text value on a separate line {text}{nl} example 2 complete text output with events processing \[onsession] {tab}session application {app filename}{tab} {app version} {tab} date/time {start date} {start time} \[onsource] {tab|#x2}source type {type} path {path} {tab|#x2} files {files} bc count {bc count} \[onfile] {tab|#x3}file path {path} {tab|#x3} pages {pages} format {format} size {size} bc count {bc count} \[onpage] {tab|#x4}page\ path {path} page {page} {tab|#x4} width {width} height {height} bpp {bpp} hdpi {hdpi} vdpi {vdpi} {tab|#x4} compr {compr} bc count {bc count} \[onbarcode] {tab|#x5}barcode type {type} length {length} {tab|#x5} rectangle {rectangle left} {rectangle top} {rectangle right} {rectangle bottom} {tab|#x5} rotation {rotation} path {path} page {page} {tab|#x5} skew {skew} mode {mod} encoding {encoding} {tab|#x5} text {text} {tab|#x5} data {data} \[ondrvlic] {tab|#x6} driver license {tab|#x6} name {last} {middle} {first} {tab|#x6} data {dob} eyes {eyes} hair {hair} sex {sex} height {height} weight {weight} {tab|#x6} address {street} {city} {state} {postal} {tab|#x6} license {id} issued {issued} expires {expires} non english barcode text all output formats are created using utf 8 encoding to accurately represent non english file names and barcode text values localized language text can be encoded in the barcode in several ways type generation process auto detection utf8 utf8 text is encoded as utf 8 before barcode generation yes eci eci barcode generator uses extended channel interpretation https //en wikipedia org/wiki/extended channel interpretation yes generator generator the barcode generator encodes text according to barcode type specification, e g , kanji https //en wikipedia org/wiki/qr code for qr code yes codepage codepage text encoded using language specific code page before barcode generation no the barcode recognition engine automatically detects and outputs the utf 8 barcode values for utf8 utf8 , eci eci , and generator generator types to convert codepage codepage text to utf 8 text set encoding encoding option before source source using incorrect encoding encoding for codepage codepage type barcodes results in an incorrect output text value barcodereadercli uses iconv https //en wikipedia org/wiki/iconv library to perform conversion from all popular languages to utf 8 a list of typically supported encodings is shown here https //www inliteresearch com/help/barcodereadercli/output/encodings txt some of the encoding names are just aliases for the same encoding