ByteScout Barcode Reader SDK - VB.NET - Reduce CPU Usage - ByteScout

ByteScout Barcode Reader SDK – VB.NET – Reduce CPU Usage

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Reader SDK – VB.NET – Reduce CPU Usage

How to reduce CPU usage in VB.NET with ByteScout BarCode Reader SDK

This code in VB.NET shows how to reduce CPU usage with this how to tutorial

The sample shows steps and algorithm of how to reduce CPU usage and how to make it work in your VB.NET application. Want to reduce CPU usage in your VB.NET app? ByteScout BarCode Reader SDK is designed for it. ByteScout BarCode Reader SDK is the barcode decoder with support for code 39, code 128, QR Code, Datamatrix, GS1, PDF417 and all other popular barcodes. Can read barcodes from images, pdf, tiff documents and live web camera. Supports noisy and damaged documents, can split and merge pdf and tiff documents based on barcodes. Can export barcode decoder results to XML, JSON, CSV and into custom data structures.

The SDK samples like this one below explain how to quickly make your application do reduce CPU usage in VB.NET with the help of ByteScout BarCode Reader SDK. In order to implement the functionality, you should copy and paste this code for VB.NET below into your code editor with your app, compile and run your application. This basic programming language sample code for VB.NET will do the whole work for you to reduce CPU usage.

Trial version of ByteScout BarCode Reader SDK is available for free. Source code samples are included to help you with your VB.NET app.

Try ByteScout BarCode Reader SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

Program.vb
      
Imports Bytescout.BarCodeReader Class Program Friend Shared Sub Main(args As String()) ' Barcode reader instance Dim reader As New Reader() reader.RegistrationName = "demo" reader.RegistrationKey = "demo" 'If you are reading barcodes from PDF Then you may reduce CPU And RAM load Using the following approach: '- instead of using All1D Or All2D barcode types, set it to the specific types you have in your documents Like PDF417 Or Code 39. You may set multiple barcode types if you need to '- reduce PDF rendering resolution to 200-150 dpi (depends on your document) '- set specific pages to read barcodes from. If you have barcodes on 2 first pages only then change the code to read barcodes from first 2 pages only. '- if barcodes are always located / printed in the same corner then also specify the area to read from instead of whole page for scanning ' Input filename Dim inputFileName As String = "barcode_multipage.pdf" ' Set specific barcode type to read reader.BarcodeTypesToFind.Code128 = True ' Reduce PDF rendering resolution reader.PDFRenderingResolution = 150 ' Set specific area to read from reader.CustomAreaLeft = 407 reader.CustomAreaTop = 494 reader.CustomAreaHeight = 605 reader.CustomAreaWidth = 999 ' Set specific page to read from along with filename reader.ReadFromPdfFilePage(inputFileName, 1, 1) ' Get all found barcodes Dim barcodes As FoundBarcode() = reader.FoundBarcodes ' Display found barcodes Console.WriteLine("Reading barcode(s) from PDF file...") For Each barcode As FoundBarcode In barcodes Console.WriteLine("Found Barcode - Type: '{0}', Value: '{1}'", barcode.Type, barcode.Value) Next ' Cleanup reader.Dispose() Console.WriteLine() Console.WriteLine("Press any key to continue.") Console.ReadKey() End Sub End Class

Try ByteScout BarCode Reader SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

Get 60 Day Free Trial or Visit ByteScout BarCode Reader SDK Home Page

Explore ByteScout BarCode Reader SDK Documentation

Get ByteScout BarCode Reader SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next