Barcodes with Binary Data |
Barcode values may contain unprintable characters, which may be ASCII formatting character (carriage return, line feed, etc), UNICODE-characters with values large then 0x80, or just binary data. For the purpose of this discussion they are all called Binary Data.
Text reports (either XML or comma or TAB-separated files) are not well suited to represent such data. This section discusses several methods how binary data can accurately be reported for the purpose of post processing of Barcode Director results.
The Barcode Value File contain raw barcode data. Each barcode value is stored in it's own file. Obtaining the value is as simple as reading the file in binary format. No decoding or translation is required.
To produce Barcode Value File add, then activate Barcode Value File in the Reports Panel.
The XML Result file contains all session's data. Barcode data are stored as a value of the Barcode tag. The binary data are stored as base64 data, and can be identified by the presence of the following attributes:
xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64"
To obtain the value of such binary data in a byte array use
the nodeTypedValue property
of the XML Node object.
The Value of the dataType
property of the XML node is set to bin.base64
If barcode value contains text data, then the nodeTypedValue has the same string value as the text property of the XML Node object.
To store the correct binary value in the Session
Report set the Write
Binary Values field to Hex or Base64.
To read the value back, your software should convert the file data
back to a byte array.
Note: in Comma- and Tab- separated format length of a data filed is limited to 252 characters, therefore if HEX or Base64 converted value is longer, it would not be accurately represented.
Copyright © 2010 Inlite Research,
Inc. All rights reserved.
Barcode Director v1.1.0