How to read Macro/Structure Append barcode in C#?

How to read Macro/Structure Append barcode images using C# in ASP.NET Core, MVC, WinForms, WPF Windows applications with free C# source code

Using Free C# Souce Code to read Structure Append/Macro barcode images for ASP.NET and Windows application







About Macro / Structure Append Barcodes

Top
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.




How to read QR Code or Data Matrix with Structure Append mode in C#?

Top


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;
                }
            }




How to read Macro PDF417 barcode images in C#?

Top


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?
















OnBarcode is a market-leading provider of barcode imaging generator, reader controls and components for ASP.NET, Windows Forms, WPF, as well Java, Android, iOS (iPhone, iPad) across all major enterprise development platforms. We provides comprehensive tutorials and how-tos for various linear, 2d barcode information, such as C# in ASP.NET, C# .NET, C# Barcode Encoding, C# Barcode Image, VB.NET in ASP.NET, VB.NET Winforms, VB.NET Barcode Encoding. OnBarcode barcode products are supported by RasterEdge ASP.NET Document Viewer, which supports ASP.NET PDF Viewer, ASP.NET MVC Document Viewer, ASP.NET PDF Editor, MVC PDF Viewer. And provide high quality C# Convert PDF to Tiff, C# Convert PDF to Word, C# Convert PDF to HTML, C# Convert PDF to Jpeg images, and their easy and simple documents, like C# PDF SDK, C# extract text from PDF, C# Compress PDF, Print PDF in C# and C# extract image from PDF.
Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.