ByteScout Data Extraction Suite - C# - Make Searchable PDF Discarding Existing Content with PDF Extractor SDK - ByteScout

ByteScout Data Extraction Suite – C# – Make Searchable PDF Discarding Existing Content with PDF Extractor SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout Data Extraction Suite – C# – Make Searchable PDF Discarding Existing Content with PDF Extractor SDK

How to make searchable PDF discarding existing content with PDF extractor SDK in C# with ByteScout Data Extraction Suite

Learning is essential in computer world and the tutorial below will demonstrate how to make searchable PDF discarding existing content with PDF extractor SDK in C#

These source code samples are assembled by their programming language and functions they apply. ByteScout Data Extraction Suite is the bundle that includes three SDK tools for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK and you can use it to make searchable PDF discarding existing content with PDF extractor SDK with C#.

This prolific sample source code in C# for ByteScout Data Extraction Suite contains various functions and other necessary options you should do calling the API to make searchable PDF discarding existing content with PDF extractor SDK. Just copy and paste the code into your C# application’s code and follow the instructions. Further improvement of the code will make it more robust.

Our website gives trial version of ByteScout Data Extraction Suite for free. It also includes documentation and 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 System.Diagnostics; using Bytescout.PDFExtractor; // To make OCR work you should references "Bytescout.PDFExtractor.dll" and "Bytescout.PDFExtractor.OCRExtension.dll" from your project. namespace MakeSearchablePDFDiscardingExistingContent { class Program { static void Main(string[] args) { // Create Bytescout.PDFExtractor.TextExtractor instance SearchablePDFMaker searchablePDFMaker = new SearchablePDFMaker(); searchablePDFMaker.RegistrationName = "demo"; searchablePDFMaker.RegistrationKey = "demo"; // Load sample PDF document searchablePDFMaker.LoadDocumentFromFile("sample_ocr_withText.pdf"); // Set the location of language data files searchablePDFMaker.OCRLanguageDataFolder = @"c:\Program Files\Bytescout PDF Extractor SDK\ocrdata\"; // Set OCR language searchablePDFMaker.OCRLanguage = "eng"; // "eng" for english, "deu" for German, "fra" for French, "spa" for Spanish etc - according to files in "ocrdata" folder // Set PDF document rendering resolution searchablePDFMaker.OCRResolution = 300; // Discard Existing Text in document searchablePDFMaker.DiscardExistingDocumentText = true; // Save extracted text to file searchablePDFMaker.MakePDFSearchable("output.pdf"); // Cleanup searchablePDFMaker.Dispose(); // Open output file in default associated application ProcessStartInfo processStartInfo = new ProcessStartInfo("output.pdf"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

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

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next