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.

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

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); } } }

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