ByteScout PDF Extractor SDK - C# - TextExtractor Progress Indication - ByteScout

ByteScout PDF Extractor SDK – C# – TextExtractor Progress Indication

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – C# – TextExtractor Progress Indication

textextractor progress indication in C# using ByteScout PDF Extractor SDK

Write code in C# to make textextractor progress indication with this How-To tutorial

The sample source codes on this page will demonstrate you how to make textextractor progress indication in C#. ByteScout PDF Extractor SDK was made to help with textextractor progress indication in C#. 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.

This rich sample source code in C# for ByteScout PDF Extractor SDK includes the number of functions and options you should do calling the API to implement textextractor progress indication. Follow the instruction from the scratch to work and copy and paste code for C# into your editor. Enjoy writing a code with ready-to-use sample C# codes to add textextractor progress indication functions using ByteScout PDF Extractor SDK in C#.

Our website provides free trial version of ByteScout PDF Extractor SDK. It comes along with all these source code samples with the goal to help you with your C# application implementation.

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

Program.cs
      
using Bytescout.PDFExtractor; using System; namespace TextExtractorProgressChangedEvent { class Program { static void Main(string[] args) { try { //Read all file content... using (TextExtractor extractor = new TextExtractor()) { // Load document extractor.LoadDocumentFromFile("sample.png"); // Extractor Progress event Console.WriteLine("Text Extraction in progress: \n"); extractor.ProgressChanged += 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 var allExtractedText = extractor.GetText(); Console.WriteLine("\n\nExtracted Text:\n\n{0}", allExtractedText); } } catch (Exception ex) { Console.WriteLine(ex.Message); } Console.WriteLine("Press enter key to exit..."); Console.ReadLine(); } /// <summary> /// Handle progress change event /// </summary> private static void Extractor_ProgressChanged(object sender, OngoingOperation ongoingOperation, double progress, ref bool cancel) { drawTextProgressBar(Convert.ToInt32(progress), 100); } /// <summary> /// Display progress bar /// </summary> private static void drawTextProgressBar(int progress, int total) { //draw empty progress bar Console.CursorLeft = 0; Console.Write("["); //start Console.CursorLeft = 32; Console.Write("]"); //end Console.CursorLeft = 1; float onechunk = 30.0f / total; //draw filled part int position = 1; for (int i = 0; i < onechunk * progress; i++) { Console.BackgroundColor = ConsoleColor.Green; Console.CursorLeft = position++; Console.Write(" "); } //draw unfilled part for (int i = position; i <= 31; i++) { Console.BackgroundColor = ConsoleColor.Gray; Console.CursorLeft = position++; Console.Write(" "); } //draw totals Console.CursorLeft = 35; Console.BackgroundColor = ConsoleColor.Black; Console.Write(progress.ToString() + " of " + total.ToString() + " "); //blanks at the end remove any excess } } }

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