ByteScout Premium Suite - C# - Repair Text in PDF with PDF Extractor SDK - ByteScout

ByteScout Premium Suite – C# – Repair Text in PDF with PDF Extractor SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – C# – Repair Text in PDF with PDF Extractor SDK

repair text in PDF with PDF extractor SDK in C# and ByteScout Premium Suite

Learn repair text in PDF with PDF extractor SDK in C#

These source code samples are assembled by their programming language and functions they use. ByteScout Premium Suite was made to help with repair text in PDF with PDF extractor SDK in C#. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.

Save time on writing and testing code by using the code below and use it in your application. Just copy and paste this C# sample code to your C# application’s code editor, add a reference to ByteScout Premium Suite (if you haven’t added yet) and you are ready to go! Enjoy writing a code with ready-to-use sample C# codes to implement repair text in PDF with PDF extractor SDK using ByteScout Premium Suite.

ByteScout Premium Suite free trial version is available for download from our website. Free trial also includes programming tutorials along with source code samples.

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

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

Program.cs
      
using Bytescout.PDFExtractor; using System; namespace RepairText { class Program { static void Main(string[] args) { try { //Read all text from pdf file using (TextExtractor extractor = new TextExtractor()) { // Load PDF document extractor.LoadDocumentFromFile("sample.pdf"); // Set the font repairing OCR mode extractor.OCRMode = OCRMode.TextFromImagesAndVectorsAndRepairedFonts; // 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 string allText = extractor.GetText(); Console.WriteLine("Extracted Text: \n\n" + allText); } } catch (Exception ex) { Console.WriteLine(ex.Message); } Console.ReadLine(); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium 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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next