using IronBarCode;
// Reading many images asynchronously using ReadAsync
string[] imagePaths = new string[] { "image1.png", "image2.png" };
var resultsAsync = BarcodeReader.ReadAsync(imagePaths, new BarcodeReaderOptions() { ExpectMultipleBarcodes = true });
// Reading many PDFs asynchronously using ReadPdfAsync
string[] pdfPaths = new string[] { "doc1.pdf", "doc2.pdf" };
var resultsPdfAsync = BarcodeReader.ReadPdfAsync(pdfPaths, new PdfBarcodeReaderOptions() { ExpectMultipleBarcodes = true, Scale = 3, DPI = 300 });
Imports IronBarCode
' Reading many images asynchronously using ReadAsync
Private imagePaths() As String = { "image1.png", "image2.png" }
Private resultsAsync = BarcodeReader.ReadAsync(imagePaths, New BarcodeReaderOptions() With {.ExpectMultipleBarcodes = True})
' Reading many PDFs asynchronously using ReadPdfAsync
Private pdfPaths() As String = { "doc1.pdf", "doc2.pdf" }
Private resultsPdfAsync = BarcodeReader.ReadPdfAsync(pdfPaths, New PdfBarcodeReaderOptions() With {
.ExpectMultipleBarcodes = True,
.Scale = 3,
.DPI = 300
})
Install-Package BarCode
Read Barcodes Asynchronously
We can read barcodes using the BarcodeReader class. The easiest method to use is the BarcodeReader.Read method. IronBarcode also has a ReadAsync method for multithreaded asynchronous programming.
Do take note of all the various options in BarcodeReaderOptions that allow you to customize your reading to be faster, more memory efficient, and more accurate.
Related Docs Links
Ready to get started? Version: 2024.12 just released