C# GS1-128 Reader SDK Integration
Online tutorial for reading & scanning GS1-128 barcode images using C#.NET class
Download .NET Barcode Reader Free Evaluation
Purchase .NET Barcode Reader License

How to read, scan, decode GS1-128 / EAN-128 images in C#.NET class, ASP.NET Web & Windows applications

  • Scan GS1-128 / EAN-128 barcode in C# class, Console applications
  • Read GS1-128 / EAN-128 barcode in C# ASP.NET web projects
  • Read, decode GS1-128 / EAN-128 images in Visual Studio C#.NET Windows Forms applications
  • Easy and simple to integrate GS1-128 / EAN-128 reader component (single dll file) into your C# project
  • Complete developed in C#.net 2005, for .net framework 2.0 and later version
  • Scanning, decoding GS1-128 / EAN-128 from multiple image formats, like BMP, GIF, JPEG, PNG, TIFF formats
  • Scanning, reading GS1-128 / EAN-128 from multi-page TIFF documents

C# GS1-128 / EAN-128 Reader Introduction
Top
C# GS1-128 / EAN-128 Reader SDK is a high performance C# linear and 2d barcode recognition SDK for Microsoft Visual Studio C#.NET platform.
Scan and read GS1-128 / EAN-128 barcodes from image files is one of the barcode decoding functions in .NET Barcode Reader component. To help .net developers easiy integrate barcode reader control into your .net projects, we provide detailed online tutorial for
C#.NET Barcode Reader component supports scanning and reading 20+ linear, 2d barcodes, including
You may also be interested in:
Install C#.NET Barcode Reader Control to Your C# project
Top
  • Copy OnBarcode.Barcode.BarcodeScanner.dll to your C#.NET project folder (do not copy dll file to your project bin folder).
  • Add OnBarcode.BarcodeReader.dll to your C# project reference.

Reading GS1-128 / EAN-128 in C# Class

Top
Here we have generated a sample GS1-128 barcode image with GS1 data "(01)09012345678901(17)240915(10)abc123(3930)978112".



Use the following C# source code, you could easily read all GS1 data elements from the above GS1-128 barcode image.

  • Choose target barcode type as BarcodeType.Code128. GS1-128 data is using Code 128 barcode as data carrier.

  • Call method BarcodeScanner.ScanInDetails() to read, scan a barcode image file with the target barcode type.

  • For all the returned all scanned BarcodeDetail objects, check each barcode is a GS1 barcode using method IsGS1Compitable().

  • Get the GS1 data message using BarcodeDetail.GetMessage().


            string inputFilePath = "W://Projects//Test-Input//gs1-sample-data-gs1-128.png";
            //  Scan barcodes from the input image file.
            BarcodeDetail[] result = BarcodeScanner.ScanInDetails(inputFilePath, BarcodeType.Code128);
            foreach (BarcodeDetail b in result)
            {
                //  Indicate if the barcode is conform to GS1 specification.
                if (b.IsGS1Compitable)
                {
                    //  Get message in string format.
                    //  Eg. "(415)5412345678908(3911)710125"
                    String msg = b.GetMessage();
                    Console.WriteLine("Data: '{0}'", b.Data);
                    Console.WriteLine("Message: {0}", msg);
                    //  Retrieve each AI and its data from the message.
                    //  Eg.
                    //  AI:   415
                    //  Data: 5412345678908
                    //  AI:   3911
                    //  Data: 710125
                    String[] vals = msg.Split(new char[] { '(', ')' }, StringSplitOptions.RemoveEmptyEntries);
                    for (int i = 0; i < vals.Length; i += 2)
                    {
                        Console.WriteLine("AI:    {0}", vals[i]);
                        Console.WriteLine("Data:  {0}", vals[i + 1]);
                    }
                }
            }


Output in the console window:

Data: '01090123456789011724091510abc1233930978112'
Message: (01)09012345678901(17)240915(10)abc123(3930)978112
AI:    01
Data:  09012345678901
AI:    17
Data:  240915
AI:    10
Data:  abc123
AI:    3930
Data:  978112




C# Barcode Reading & Scanning Tutorials
Top

Barcode Reader SDK for C#.NET - Barcode Image Reading

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.