Some barcodes (Such as QR Code, Data Matrix, PDF417) allow a data message to be encoded across multiple barcode symbols.
Structured Append (also known as
Macro in PDF-417) allows these barcode symbols to be scanned in any sequence but automatically re-grouped in the correct order to form the original data message.
During encoding data message into multiple barcode symbols, the necessary sequence information (Structure Append header) has been encoded into barcodes. And when the barcode reader device or software decode the barcodes, all the sequence information will be conveyed in a uniform manner.
Up to 16 QR Code or Data Matrix symbols may be appended in a structured format.
The following C# source code will explain how to read all QR Code barcodes from a single image. And check each scanned QR Code whether it is in Structure Append mode or not.
- Get all QR Code data from a single image file using C# method BarcodeScanner.ScanInDetails()
- For each QR Code data, check whether it is in Structure Append mode using property BarcodeDetail.IsStructuredAppend
- Get total number of qr code symbols from the same message, through property BarcodeDetail.SymbolCountInStructuredAppend
- Identify the position of this qr code symbol in the message sequence, through property BarcodeDetail.SymbolPositionInStructuredAppend
String imageFilePath = "...";
// scan all QR Code symbols in the image file
BarcodeDetail[] datas = BarcodeScanner.ScanInDetails(imageFilePath, BarcodeType.QRCode);
for (int j = 0; j < datas.Length; j++)
{
// check if this QR Code symbol is structure append
if (datas[j].IsStructuredAppend)
{
// total number of qr code symbols from the same message
int symbolCount = datas[j].SymbolCountInStructuredAppend;
// identify the position of this qr code symbol in the message sequence
int symbolPosition = datas[j].SymbolPositionInStructuredAppend;
}
}
PDF417 is using Macro mode to split and store a large data into multiple PDF417 barcode symbols. Up to 99,999 PDF417 barcodes may be used to encode the same data in Macro PDF417.
You can view the detailed C# source code with text here:
How to read Macro PDF417 using C# barcode reader library?