Read Barcodes Asynchronously
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.ReadPdfsAsync(pdfPaths, new PdfBarcodeReaderOptions() { ExpectMultipleBarcodes = true, Scale = 3, DPI = 300 });
NuGet Download
PM > Install-Package BarCode
Read Barcodes Asynchronously

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.

Key Points

  • Synchronous vs Asynchronous Methods
    • Read method is straightforward for use when immediate results are needed and is called on the main thread.
    • ReadAsync method is for asynchronous execution, allowing the program to continue with other tasks while waiting for the barcode reading to complete.
  • BarcodeReaderOptions
    • ExpectMultipleBarcodes: If set to true, the reader will look for multiple barcodes in the image.
    • Speed: Sets the reading speed versus accuracy trade-off using the ReadingSpeed enum.
    • Multithreaded: Enables multithreaded reading, which is useful for processing large numbers of images quickly.
Explore Asynchronous and Multithreaded Barcode Reading
View on GitHub

Ready to Get Started?

Nuget Downloads 2,523,385Version:2026.10just released