Our Customers
|
How to scan, read barcodes with Structured Append in C# ASP.NET, Windows application?
Barcode Reader for .NET is the best .NET / C# barcode image recognition component in the market.
About barcode with Structured Append mode
Every barcode symbology has maximum number of data to encode. To encode large data message, some barcode symboloy support Structured Append mode.
QR Code and Data Matrix do support encode data with Structured Append mode. You can encode up to 16 QR Code or Data Matrix barcodes to store one data message.
If a QR Code or Data Matrix symbol is part of a Structured Append message,
it must contain a header block in the first two and a half symbol character positions to store the following three properties.
- Parity data: all symbols encoding the same data message must use the same parity data
- Symbol Sequence Indicator: The first 4 bits of Symbol Sequence Indicator indicates the position of the QR Code or Data Matrix symbol.
The last 4 bits indentify the total number of symbols
How to read QR Code barcode with Unicode text encoded using C#?
Using Barcode Reader for C# library, you can easily scan barcodes in Structured Append mode and parse all the information.
The following C# code and text explains how to scan barcodes and get the barcode data in Structured Append mode.
- Call method BarcodeReader.BarcodeReader.ReadBarcode() to get all barcodes information (in list of BarCode objects) from an existing image file, image in Stream object or byte array object.
- For each scanned BarCode object, use property IsStructuredAppend to check whether it is in Struectred Append mode
- If the barcode is in Structured Append mode, get the following three properties for Structured Append.
- SymbolFileID is the same as Parity data. All symbols from the same data message must use the same SymbolFileID.
- SymbolCount is the number of symbols which are encoding the same data message.
- SymbolSeqNum is the position of the sequence. The position value of the first symbol is 0.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 | string inputFilePath = "C://Projects//Demo-Files//qrcode-in-structure-append-mode.png";
// scan all QR Code symbols in the image file
BarCode[] datas = BarcodeReader.BarcodeReader.ReadBarcode(inputFilePath, BarcodeReader.BarcodeReader.QRCODE);
Trace.WriteLine("Total QR Codes found: " + datas.Length);
foreach (BarCode barcodeData in datas)
{
// check if this QR Code symbol is structure append
if (barcodeData.IsStructuredAppend)
{
int fileId = barcodeData.SymbolFileID;
int symbolCount = barcodeData.SymbolCount;
int symbolSequenceNumber = barcodeData.SymbolSeqNum;
}
}
|
Also provides .NET Barcode Reader, ASP.NET Barcode Reader, C# Barcode Reader, VB.NET Barcode Reader, .NET QR Code Reader, ASP.NET QR Code Reader, C# QR Code Reader, VB.NET QR Code Reader, .NET Data Matrix Reader, .NET Code 128 Reader, Java Barcode SDK, .NET Barcode SDK, ASP.NET Barcode SDK, Visual C# Barcoding, Visual Basic .NET Barcoding. |