Our Customers
Contact Us Email: support@barcodelib.com
Home > .NET Barcode Reader > .NET Barcode Reading Guide > .NET Code-128/GS1-128/EAN-128 Barcode Reader for C#, VB.NET Applications
Download Barcode Reader for .NET Trial

.NET Code-128/GS1-128/EAN-128 Barcode Reader for C#, VB.NET Applications

Scan & Read Code-128/GS1-128/EAN-128 barcodes in C#.NET, VB.NET, ASP.NET projects
  • Easily read & scan Code-128/GS1-128/EAN-128 barcodes in .NET applications
  • Reading Code-128/GS1-128/EAN-128 barcode images in JPEG, GIF, PNG, BMP, TIFF formats
  • 100% build in C#.net, compatible with .NET 2.0 and later versions
  • Complete sample C#.net, VB.net sample codes for C# & VB.NET developers
  • Mature Code 128 .NET Barcode Reader Component since 2003
Install .NET Code-128/GS1-128/EAN-128 Barcode Reader
  1. Add BarcodeLib.BarcodeReader.dll to your .NET project reference.
Scan & Read Code-128/GS1-128/EAN-128 Barcodes in C#.NET
Scan and read Code-128/GS1-128/EAN-128 barcode in C# is an easy and simple task. One line of C# code finishes the job.
     string[] results = BarcodeReader.read("c:/code128-barcode.gif", BarcodeReader.CODE128);
The above C# code will get all Code-128/GS1-128/EAN-128 barcodes in image file "code128-barcode.gif".
Scan & Read Code-128/GS1-128/EAN-128 Barcodes in VB.NET
Scan and read Code-128/GS1-128/EAN-128 barcode in VB.NET is an easy and simple task. One line of vb.net code finishes the job.
     Dim datas() As String = BarcodeReader.read("c:/code128-barcode.gif", BarcodeReader.CODE128)
The above VB.NET code will get all Code-128/GS1-128/EAN-128 barcodes in image file "code128-barcode.gif".
Optimize Code-128/GS1-128/EAN-128 Barcode Reading Performance in C#.NET & VB.NET
You can customize our .NET barcode reader component, to improve Code-128/GS1-128/EAN-128 barcode reading speed, when you are scanning large image size (like 4mb per image).
  1. Set maxOneBarcodePerPage to true, if there is maximum one barcode per image or per page in tiff or pdf document.
    If maxOneBarcodePerPage is true, the .net barcode reader library will stop scanning the barcode immediately, once detects one barcode.
    If maxOneBarcodePerPage is false (default value), the library will use total 5 algorithms and each will scan the whole image from 4 directions.

  2. Scan the partial image instead of the whole file.
    If the barcode is always located one specified area in the image, you can set and let the library scan that area only. And it will reduce lots of scanning time, CPU and memory usage.
    You just specify the left top point and right bottom point of the area (the point X, Y values are expressed in percentage of the whole image, so image most left top point is (0%, 0%), and most right bottom point is (100%, 100%)).
The following C# code explains how to scan top 20% of the image and bottom 20% of the image.
     OptimizeSetting setting = new OptimizeSetting();

setting.setMaxOneBarcodePerPage(true);

ScanArea top20 = new ScanArea(new PointF(0.0F, 0.0F), new PointF(100.0F, 20.0F));

ScanArea bottom20 = new ScanArea(new PointF(0.0F, 80.0F), new PointF(100.0F, 100.0F));

List<ScanArea> areas = new List<ScanArea>();
areas.Add(top20);
areas.Add(bottom20);

setting.setAreas(areas);

string[] results = BarcodeReader.read("c:/code128-barcode.gif", BarcodeReader.CODE128, setting);
The following VB.NET code explains how to scan top 20% of the image and bottom 20% of the image.
     Dim setting As OptimizeSetting = New OptimizeSetting()

setting.setMaxOneBarcodePerPage(True)

Dim top20 As ScanArea = New ScanArea(New Drawing.PointF(0.0F, 0.0F), New Drawing.PointF(100.0F, 20.0F))

Dim bottom20 As ScanArea = New ScanArea(New Drawing.PointF(0.0F, 80.0F), New Drawing.PointF(100.0F, 100.0F))

Dim areas As List(Of ScanArea) = New List(Of ScanArea)
areas.Add(top20)
areas.Add(bottom20)

setting.setAreas(areas)

Dim datas() As String = BarcodeReader.read("c:/code128-barcode.gif", BarcodeReader.CODE128, setting)

.NET Barcode Reader & Scanner Supporting Barcode Types/Symbologies
Read .NET 1D Barcodes:
Read .NET 2D Barcodes:
All Decodable Linear Barcodes: Codabar, Code 39, Code 128, Interleaved 2 of 5, EAN 8, EAN 13, UPC-A, UPC-E.

All Decodable Matrix Barcodes: Data Matrix, PDF-417, QR-Code.