Read Barcodes
Reading barcodes using IronBarCode is effective and simple. IronBarcode supports various formats and has different methods for each situation. Whether you are a developer looking to read barcodes from images or a developer who needs to integrate a barcode application and manipulate the data, IronBarcode has you covered.
Barcode Reader in C#
var resultFromFile = BarcodeReader.Read(@"file/barcode.png")
var resultFromBitMap = BarcodeReader.Read(new Bitmap("barcode.bmp"));
var resultFromImage = BarcodeReader.Read(Image.FromFile("barcode.jpg"))
var resultFromStream = BarcodeReader.Read(myStream)
var resultFromPdf = BarcodeReader.ReadPdf(@"file/mydocument.pdf");
With the BarcodeReader.Read
method, developers can pass along the file path of any standard image formats such as png
, jpg
and jpeg
to quickly read the values within the file. Furthermore, the BarcodeReader.Reader
method works for Bitmap
and AnyBitmap
. This is ideal for applications that require manipulating or passing values using the standard Bitmap
class. For developers needing a universally compatible Bitmap format across .NET 7, .NET 6, .NET 5, and .NET Core, the AnyBitmap
class offers a platform-agnostic solution. It enables seamless cross-compatibility, allowing you to write flexible code and pass variables without any obstructions.
The BarcodeReader
class also has specific methods for reading barcodes from a PDF using ReadPdf
to read barcodes from every image embedded in the PDF document, allowing developers to quickly obtain all barcodes.
Aside from the specified methods, the BarcodeReader
methods allow developers to pass in the BarcodeReader.BarcodeReaderOptions
for more fine-grain control and customization. This applies to every single method within the BarcodeReader
class, enabling only the first barcode to save time, reading specific types of barcodes, and utilizing multithreading, among other customization options.
Click here to view the How-to Guide, including examples, sample code, and files