IRONSOFTWAREHOME
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 });
Imports IronBarCode

' Reading many images asynchronously using ReadAsync
Dim imagePaths As String() = New String() {"image1.png", "image2.png"}
Dim resultsAsync = BarcodeReader.ReadAsync(imagePaths, New BarcodeReaderOptions() With {.ExpectMultipleBarcodes = True})

' Reading many PDFs asynchronously using ReadPdfAsync
Dim pdfPaths As String() = New String() {"doc1.pdf", "doc2.pdf"}
Dim resultsPdfAsync = BarcodeReader.ReadPdfsAsync(pdfPaths, New PdfBarcodeReaderOptions() With {.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,422,100Version:2026.9just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required