ByteScout PDF Suite - VB.NET - Searchablepdfmaker progress indication with pdf extractor sdk - ByteScout

ByteScout PDF Suite – VB.NET – Searchablepdfmaker progress indication with pdf extractor sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – VB.NET – Searchablepdfmaker progress indication with pdf extractor sdk

searchablepdfmaker progress indication with pdf extractor sdk in VB.NET and ByteScout PDF Suite

searchablepdfmaker progress indication with pdf extractor sdk in VB.NET

Writing of the code to searchablepdfmaker progress indication with pdf extractor sdk in VB.NET can be done by developers of any level using ByteScout PDF Suite. Searchablepdfmaker progress indication with pdf extractor sdk in VB.NET can be applied with ByteScout PDF Suite. ByteScout PDF Suite is the set that includes 6 SDK products to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript.

The below SDK samples describe how to quickly make your application do searchablepdfmaker progress indication with pdf extractor sdk in VB.NET with the help of ByteScout PDF Suite. If you want to know how it works, then this VB.NET sample code should be copied and pasted into your application’s code editor. Then just compile and run it. Updated and detailed documentation and tutorials are available along with installed ByteScout PDF Suite if you’d like to learn more about the topic and the details of the API.

If you want to try other samples for VB.NET then free trial version of ByteScout PDF Suite is available on our website.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.vb
      
Imports Bytescout.PDFExtractor Module Program Sub Main() Try Using searchablePDFMaker = New SearchablePDFMaker("demo", "demo") ' Load input file searchablePDFMaker.LoadDocumentFromFile("sample_ocr.pdf") ' Add Progress change event... Console.WriteLine("Searchable PDF making in progress: " & vbLf) AddHandler searchablePDFMaker.ProgressChanged, AddressOf SearchablePDF_ProgressChanged ' Set the location of OCR language data files searchablePDFMaker.OCRLanguageDataFolder = "c:\Program Files\Bytescout PDF Extractor SDK\ocrdata\" ' Set OCR language searchablePDFMaker.OCRLanguage = "eng" ' Set PDF document rendering resolution searchablePDFMaker.OCRResolution = 300 ' Save extracted text to file searchablePDFMaker.MakePDFSearchable("output.pdf") ' Open output file in default associated application System.Diagnostics.Process.Start("output.pdf") End Using Catch ex As Exception Console.WriteLine(ex.Message) End Try Console.WriteLine(vbLf & vbLf & " Press enter key to exit...") Console.ReadLine() End Sub ''' <summary> ''' Handle progress change event ''' </summary> Private Sub SearchablePDF_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

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next