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

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

searchablepdfmaker progress indication in VB.NET with ByteScout PDF Extractor SDK

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

We’ve created and updating regularly our sample code library so you may quickly learn searchablepdfmaker progress indication and the step-by-step process in VB.NET. Searchablepdfmaker progress indication in VB.NET can be implemented with ByteScout PDF Extractor SDK. ByteScout PDF Extractor SDK is the SDK is designed to help developers with pdf tables and pdf data extraction from unstructured documents like pdf, tiff, scans, images, scanned and electronic forms. The library is powered by OCR, computer vision and AI to provide unique functionality like table detection, automatic table structure extraction, data restoration, data restructuring and reconstruction. Supports PDF, TIFF, PNG, JPG images as input and can output CSV, XML, JSON formatted data. Includes full set of utilities like pdf splitter, pdf merger, searchable pdf maker and other utilities.

The SDK samples like this one below explain how to quickly make your application do searchablepdfmaker progress indication in VB.NET with the help of ByteScout PDF Extractor SDK. VB.NET sample code is all you need: copy and paste the code to your VB.NET application’s code editor, add a reference to ByteScout PDF Extractor SDK (if you haven’t added yet) and you are ready to go! VB.NET application implementation typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

ByteScout PDF Extractor SDK is available as free trial. You may get it from our website along with all other source code samples for VB.NET applications.

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

SearchablePDFMakerProgressChangedEvent.vbproj
      
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{80667702-F68F-42E8-AF48-A3F9D8C879CF}</ProjectGuid> <OutputType>Exe</OutputType> <StartupObject>SearchablePDFMakerProgressChangedEvent.Program</StartupObject> <RootNamespace>SearchablePDFMakerProgressChangedEvent</RootNamespace> <AssemblyName>SearchablePDFMakerProgressChangedEvent</AssemblyName> <FileAlignment>512</FileAlignment> <MyType>Console</MyType> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>SearchablePDFMakerProgressChangedEvent.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugType>pdbonly</DebugType> <DefineDebug>false</DefineDebug> <DefineTrace>true</DefineTrace> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DocumentationFile>SearchablePDFMakerProgressChangedEvent.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <PropertyGroup> <OptionExplicit>On</OptionExplicit> </PropertyGroup> <PropertyGroup> <OptionCompare>Binary</OptionCompare> </PropertyGroup> <PropertyGroup> <OptionStrict>Off</OptionStrict> </PropertyGroup> <PropertyGroup> <OptionInfer>On</OptionInfer> </PropertyGroup> <ItemGroup> <Reference Include="Bytescout.PDFExtractor, Version=9.1.0.3170, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>c:\Program Files\Bytescout PDF Extractor SDK\net2.00\Bytescout.PDFExtractor.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> <Import Include="System.Collections" /> <Import Include="System.Collections.Generic" /> <Import Include="System.Data" /> <Import Include="System.Diagnostics" /> </ItemGroup> <ItemGroup> <Compile Include="Program.vb" /> </ItemGroup> <ItemGroup> <None Include="sample_ocr.pdf"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> </Project>

READ MORE

Visit ByteScout PDF Extractor SDK page or

explore documentation

GET YOUR 90 DAY FREE

https://bytescout.com/download/web-installer

Tutorials:

prev
next