C# GS1-128 / EAN-128 Reader Introduction
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
- Barcode Reader for C#
- Read barcode in asp.net c#
- Read barcode in c# windows application
- Barcode Reader for .NET
- Barcode Reader for VB.NET
C#.NET Barcode Reader component supports scanning and reading 20+ linear, 2d barcodes, including
- Read EAN-8 in C# | Read EAN-13 in C# | Read ITF-14 in C# | Read UPC-A in C#
- Read UPC-E in C# | Read ISBN in C# | Read ISSN in C# | Read QR Code in C#
You may also be interested in:
Install C#.NET Barcode Reader Control to Your C# project
- 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
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.
Output in the console window:
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
Barcode Reader SDK for C#.NET - Barcode Image Reading
- Read Linear / 1D Barcode Images:
- Read Matrix / 2D Barcode Images: Data Matrix, PDF-417, QR Code
| Australia Post | Codabar | Code 39 | Code 93 | Code 128 |
| EAN 8 | EAN 13 | GS1 128 (UCC/EAN128) | Identcode | Intelligent Mail |
| Interleaved 2 of 5 | ISBN | ISSN | ITF-14 | Leitcode |
| Patch Code | Planet | Postnet | RM4SCC | UPC-A |
| UPC-E |
