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 \<font color="#eb144c"> output=console\</font> or no \<font color="#eb144c"> output\</font> option is set console output is sent to \<font color="#eb144c">stdout\</font> all errors, diagnostics, versions, and help information are sent to \<font color="#eb144c">stderr\</font> the \<font color="#eb144c"> format\</font> option defines the format of the console output the default is json if \<font color="#eb144c"> format=text\</font> , then the \<font color="#eb144c"> output text\</font> option must be set if the \<font color="#eb144c"> output\</font> option is not set, and the last values of the \<font color="#eb144c"> format\</font> , \<font color="#eb144c"> fields\</font> , and \<font color="#eb144c"> output text\</font> 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 \<font color="#eb144c"> output text\</font> option must be set if json , csv , or text file already exists, the output action depends on the value of \<font color="#eb144c"> if exists\</font> 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 \<font color="#eb144c"> output\</font> option value options \<font color="#eb144c"> fields\</font> , \<font color="#eb144c"> output text\</font> , \<font color="#eb144c"> if exists\</font> , if set, should precede the \<font color="#eb144c"> output\</font> option for their value to be applied to that output file different options can be specified before each \<font color="#eb144c"> output\</font> 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 \<font color="#eb144c"> fields\</font> option csv format double quotes ( \<font color="#eb144c">""\</font> ) enclose barcode text values filenames containing spaces or commas the content of text outputs is defined by \<font color="#eb144c"> output text\</font> 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 \<font color="#eb144c">some folder\</font> 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 macro 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 \<font color="#eb144c">\[onsesion]\</font> after session started environment variables macros command line macros session macros \<font color="#eb144c">\[onsource]\</font> source processing is completed all of the above + source macros \<font color="#eb144c">\[onfile]\</font> image file processing is completed all of the above + file macros \<font color="#eb144c">\[onpage]\</font> page processing is completed all of the above + page macros \<font color="#eb144c">\[onbarcode]\</font> barcode is read all of the above + barcode macros \<font color="#eb144c">\[ondrvlic]\</font> 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 \<font color="#eb144c">utf8\</font> text is encoded as utf 8 before barcode generation yes \<font color="#eb144c">eci\</font> barcode generator uses extended channel interpretation https //en wikipedia org/wiki/extended channel interpretation yes \<font color="#eb144c">generator\</font> the barcode generator encodes text according to barcode type specification, e g , kanji https //en wikipedia org/wiki/qr code for qr code yes \<font color="#eb144c">codepage\</font> text encoded using language specific code page https //www inliteresearch com/help/barcodereadercli/barcodereadercli help htm before barcode generation no the barcode recognition engine automatically detects and outputs the utf 8 barcode values for \<font color="#eb144c">utf8\</font> , \<font color="#eb144c">eci\</font> , and \<font color="#eb144c">generator\</font> types to convert \<font color="#eb144c">codepage\</font> text to utf 8 text set \<font color="#eb144c"> encoding\</font> option before \<font color="#eb144c">source\</font> using incorrect \<font color="#eb144c"> encoding\</font> for \<font color="#eb144c">codepage\</font> 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