Learn how to batch read from files in VB.NET with this source code sample. What is ByteScout BarCode Reader SDK? It is the SDK for reading of barcodes from PDF, images and live camera or video. Almost every common type like Code 39, Code 128, GS1, UPC, QR Code, Datamatrix, PDF417 and many others are supported. Supports noisy and defective images and docs. Includes optional documents splitter and merger for pdf and tiff based on found barcodess. Batch mode is supported for superior performance using multiple threads. Decoded values are easily exported to JSON, CSV, XML and to custom format. It can help you to batch read from files in your VB.NET application.
VB.NET code samples for VB.NET developers help to speed up coding of your application when using ByteScout BarCode Reader SDK. In your VB.NET project or application you may simply copy & paste the code and then run your app! Use of ByteScout BarCode Reader SDK in VB.NET is also explained in the documentation included along with the product.
Trial version of ByteScout BarCode Reader SDK is available for free. Source code samples are included to help you with your VB.NET app.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
Imports System.IO
Imports Bytescout.BarCodeReader
Module Module1
Sub Main()
' Get all JPG files from the current folder
Dim filesToScan As String() = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.jpg")
' Open file to export results
Dim resultsCsvFile As StreamWriter = File.CreateText("results.csv")
' Create barcode reader instance
Dim reader As New Reader()
reader.RegistrationName = "demo"
reader.RegistrationKey = "demo"
' Set barcode types for searching
reader.BarcodeTypesToFind.EAN13 = True
' Iterate over images and read barcodes
For Each file As String In filesToScan
Console.WriteLine()
Console.WriteLine("Reading barcode(s) from image {0}", file)
' -----------------------------------------------------------------------
' NOTE: We can read barcodes from specific page to increase performance .
' For sample please refer to "Decoding barcodes from PDF by pages" program.
' -----------------------------------------------------------------------
' Read barcodes from image
Dim barcodes As FoundBarcode() = reader.ReadFrom(file)
' Display results in console
For Each barcode As FoundBarcode In barcodes
Console.WriteLine("Found barcode with type '{0}' and value '{1}'", barcode.Type, barcode.Value)
Next
' Write results to file in CSV format. Note, you can also export to TXT and XML.
Dim csv = reader.ExportFoundBarcodesToCSV()
resultsCsvFile.Write(csv)
Next
reader.Dispose()
resultsCsvFile.Dispose()
Console.WriteLine("Press any key to exit..")
Console.ReadKey()
End Sub
End Module
60 Day Free Trial or Visit ByteScout BarCode Reader SDK Home Page
Explore ByteScout BarCode Reader SDK Documentation
Explore Samples
Sign Up for ByteScout BarCode Reader SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout BarCode Reader SDK Home Page
Explore ByteScout BarCode Reader SDK Documentation
Explore Samples
Sign Up for ByteScout BarCode Reader SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: