ByteScout PDF Extractor SDK - C# - Make Searchable PDF Discarding Existing Content - ByteScout

ByteScout PDF Extractor SDK – C# – Make Searchable PDF Discarding Existing Content

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

How to make searchable PDF discarding existing content in C# using ByteScout PDF Extractor SDK

How to make searchable PDF discarding existing content in C#

Learn how to make searchable PDF discarding existing content in C# with this source code sample. 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. It can be used to make searchable PDF discarding existing content using C#.

The SDK samples like this one below explain how to quickly make your application do make searchable PDF discarding existing content in C# with the help of ByteScout PDF Extractor SDK. Just copy and paste the code into your C# application’s code and follow the instruction. Enjoy writing a code with ready-to-use sample codes in C#.

ByteScout PDF Extractor SDK free trial version is available on our website. C# and other programming languages are supported.

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 PDF Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Extractor SDK 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 Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Extractor SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next