On this page you will learn from code samples for programming in VB.NET.Writing of the code to batch read from files with barcode reader sdk in VB.NET can be executed by programmers of any level using ByteScout Barcode Suite. What is ByteScout Barcode Suite? It is the bundle that privides 3 SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK). It can help you to batch read from files with barcode reader sdk in your VB.NET application.
These VB.NET code samples for VB.NET guide developers to speed up coding of the application when using ByteScout Barcode Suite. Follow the instructions from scratch to work and copy the VB.NET code. Enjoy writing a code with ready-to-use sample codes in VB.NET.
The trial version of ByteScout Barcode Suite can be downloaded for free from our website. It also includes source code samples for VB.NET and other programming languages.
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 Suite Home Page
Explore ByteScout Barcode Suite Documentation
Explore Samples
Sign Up for ByteScout Barcode Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Barcode Suite Home Page
Explore ByteScout Barcode Suite Documentation
Explore Samples
Sign Up for ByteScout Barcode Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: