For Using BC.NetBarcodeReader.Code128 in .NET
Scan, read, and decode 1d barcode Code 128 from raster images Jpg, Jpeg, Png, Tiff, Bmp, and Gif.
It's easy to use BC.NetBarcodeReader.Code128 scanner library to scan Code 128 from images in your .NET applications. Here we will show you in simple steps. Please firstly download and get the free trial library (BC.NetBarcodeReaderTrial.Code128.dll). And the only thing for the integration of our library is to add your project reference to it.
We take the Console Application as an example of how to use BC.NetBarcodeReader.Code128 scanner library to scan and decode 1d barcode Code 128 from images. For ease of use, here are simple code examples for C# and VB.NET developers. To scan all 1d/linear and 2d barcodes, you should use BC.NetBarcodeReader.All library.
1. Scan and recognize Code 128 symbologies from an image using BC.NetBarcodeReader.Code128 scanner library. We also provide Code 128 recognition solution for Adobe PDF. If you are also interested in this, please see our product BC.NetPdfBarcodeReader.All Library and its online tutorial: how to read linear and 2d barcodes from PDF.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BC.NetBarcodeReaderTrial.Code128;
namespace BC.NetBarcodeReaderDemo
{
class Program
{
static void Main(string[] args)
{
ReadOneBarcodeTypefromImage();
}
public static void ReadOneBarcodeTypefromImage()
{
string[] data = NetBarcodeReader.Recognize("Code128.png", NetBarcodeReader.Code128);
foreach (string result in data)
{
Console.WriteLine(result);
}
Console.ReadKey();
}
}
}
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports BC.NetBarcodeReaderTrial.Code128
Module BCNetBarcodeReaderDemo
Sub Main()
ReadOneBarcodeTypefromImage()
End Sub
Public Sub ReadOneBarcodeTypefromImage()
Dim data As String() = NetBarcodeReader.Recognize("Code128.png", NetBarcodeReader.Code128)
For Each result As String In data
Console.WriteLine(result)
Next
Console.ReadKey()
End Sub
End Module