BarcodeLib.com VB.NET Barcode Reader Library is a mature .NET barcode recognition control that enable users to read & decode linear and 2d barcode images. It can be used in:
ASP.NET Website Projects
.NET Windows Forms Projects
.NET, C#, VB.NET Class Library
.NET Console Projects
Please note that, the first character of barcode data scanned by the trial package will be a random character.
How to Install VB.NET Linear & 2D Barcode Reader DLL?
Installation requirement: Please firstly install Microsoft .NET Framework Version 2.0 or greater.
Add "BarcodeLib.BarcodeReader.dll" to your Visual Studio VB.NET project reference.
How to Scan Barcode Images in VB.NET Barcode Reader SDK?
We provide free VB demo code for barcode scanning from image. Below are sample VB codes for Code 128 amd Data Matrix recognition. For other VB.NET 1d & 2d barcode reading tutorial, please refer to 1D & 2D Barcodes VB.NET Decoding.
Dim datas() AsString = BarcodeReader.read("c:/code128-barcode.gif", BarcodeReader.CODE128)
Dim datas() AsString = BarcodeReader.read("c:/datamatrix-barcode.gif", BarcodeReader.DATAMATRIX)
These two free Visual Basic demo codes will respectively decode and output all Code 128 and Data Matrix barcodes in image files "code128-barcode.gif" & "datamatrix-barcode.gif".
How to Decode Maximum Barcode Image Using VB.NET Barcode Scanner DLL?
To recognize a large size image, like 4mb per image, you may need to set our VB.NET Barcode Scanner Library to imporve barcode reading speed.
If there is a maximum one barcode per image, page in tiff or pdf document, please set maxOneBarcodePerPage to true.
If maxOneBarcodePerPage is true, our VB.NET Barcode Reader Library will immediately stop reading the barcode once detects one barcode.
If maxOneBarcodePerPage is false (default value), our VB.NET Barcode Scanner Library will use total 5 algorithms and each will read the whole image from 4 directions.
How to Read the Partial Barcode Image in VB.NET Barcode Reader DLL?
To scan the partial image instead of the whole file, you do as below.
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 only need to 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%)).
Please use the Free VB code below to scan the top 20% and bottom 20% of a Code 128 barcode image.
Dim setting As OptimizeSetting = New OptimizeSetting()
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() AsString = BarcodeReader.read("c:/code128-barcode.gif", BarcodeReader.CODE128, setting)