ByteScout PDF Extractor SDK - VB.NET - TextExtractor Progress Indication - ByteScout

ByteScout PDF Extractor SDK – VB.NET – TextExtractor Progress Indication

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – VB.NET – TextExtractor Progress Indication

textextractor progress indication in VB.NET and ByteScout PDF Extractor SDK

Tutorial: how to do textextractor progress indication in VB.NET

Today you are going to learn how to textextractor progress indication in VB.NET. Textextractor progress indication in VB.NET can be implemented with ByteScout PDF Extractor SDK. ByteScout PDF Extractor SDK is the SDK that helps developers to extract data from unstructured documents, pdf, images, scanned and electronic forms. Includes AI functions like automatic table detection, automatic table extraction and restructuring, text recognition and text restoration from pdf and scanned documents. Includes PDF to CSV, PDF to XML, PDF to JSON, PDF to searchable PDF functions as well as methods for low level data extraction.

Fast application programming interfaces of ByteScout PDF Extractor SDK for VB.NET plus the instruction and the VB.NET code below will help you quickly learn textextractor progress indication. This VB.NET sample code should be copied and pasted into your application’s code editor. Then just compile and run it to see how it works. You can use these VB.NET sample examples in one or many applications.

Trial version can be obtained from our website for free. It includes this and other source code samples for VB.NET.

Try ByteScout PDF Extractor SDK today: Get 60 Day Free Trial or sign up for Web API

Program.vb
      
Imports Bytescout.PDFExtractor Module Program Sub Main() Try ' Read all file content... Using extractor As TextExtractor = New TextExtractor() ' Load document extractor.LoadDocumentFromFile("sample.png") ' Extractor Progress event Console.WriteLine("Text Extraction in progress: " & vbLf) AddHandler extractor.ProgressChanged, AddressOf Extractor_ProgressChanged ' Set option to repair text extractor.OCRMode = OCRMode.TextFromImagesAndVectorsAndRepairedFonts ' Enable Optical Character Recognition (OCR) ' in .Auto mode (SDK automatically checks if needs to use OCR or not) extractor.OCRMode = OCRMode.Auto ' Set the location of OCR language data files extractor.OCRLanguageDataFolder = "c:\Program Files\Bytescout PDF Extractor SDK\ocrdata\" ' Set OCR language extractor.OCRLanguage = "eng" ' "eng" for english, "deu" for German, "fra" for French, "spa" for Spanish etc - according to files in "ocrdata" folder ' Find more language files at https://github.com/bytescout/ocrdata ' Set PDF document rendering resolution extractor.OCRResolution = 300 ' Read all text Dim allExtractedText = extractor.GetText() Console.WriteLine(vbLf & vbLf & "Extracted Text:" & vbLf & vbLf & "{0}", allExtractedText) End Using Catch ex As Exception Console.WriteLine(ex.Message) End Try Console.WriteLine("Press enter key to exit...") Console.ReadLine() End Sub ''' <summary> ''' Handle progress change event ''' </summary> Private Sub Extractor_ProgressChanged(ByVal sender As Object, ByVal ongoingOperation As OngoingOperation, ByVal progress As Double, ByRef cancel As Boolean) drawTextProgressBar(Convert.ToInt32(progress), 100) End Sub ''' <summary> ''' Display progress bar ''' </summary> Private Sub drawTextProgressBar(ByVal progress As Integer, ByVal total As Integer) 'draw empty progress bar Console.CursorLeft = 0 Console.Write("[") ' start Console.CursorLeft = 32 Console.Write("]") ' end Console.CursorLeft = 1 Dim onechunk As Single = 30.0F / total Dim position As Integer = 1 ' draw filled part For i As Integer = 0 To onechunk * progress - 1 Console.BackgroundColor = ConsoleColor.Green Console.CursorLeft = Math.Min(System.Threading.Interlocked.Increment(position), position - 1) Console.Write(" ") Next ' draw unfilled part For i As Integer = position To 31 Console.BackgroundColor = ConsoleColor.Gray Console.CursorLeft = Math.Min(System.Threading.Interlocked.Increment(position), position - 1) Console.Write(" ") Next ' draw totals Console.CursorLeft = 35 Console.BackgroundColor = ConsoleColor.Black Console.Write(progress.ToString() & " of " & total.ToString() & " ") ' blanks at the end remove any excess End Sub End Module

Try ByteScout PDF Extractor SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout PDF Extractor SDK page

Explore ByteScout PDF Extractor SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next