When trying to read a PDF417 barcode that contains embedded NULL characters:
// load image and convert to bitmap
Bitmap bmp = new Bitmap(Image.FromFile(@"C:\Sample.png"));
IBarcodeReader reader = new BarcodeReader();
ZXing.Result result = reader.Decode(bmp);
// do something with the result
String decodedString = result.Text;
The returned text is cut off when it encounters an embedded null
character:
IDUS3*1GORRELL, LIDIA 9991001041 0060150RDBR1992OCT31NNYYUNONE NONE 2RRT 2011NOV042052OCT308 5RESRETUSAF AMN E1 I UNKÿØÿà
What i need is the RawBytes of the PDF417 barcode.
Other, hardware, decoders do return the entire string (since it is perfectly valid for a string to contain embedded NULL characters).
There is a:
Byte[] rawResult = result.RawBytes;
But RawBytes is always null
- it doesn't mean what you think it means. It is not the RawBytes
of the read barcode; it is the raw bytes from a QR code.
How can i get the raw bytes encoded on a PDF417 card?