ByteScout PDF Extractor SDK - C# - Find Keyword And Extract Text in PDF - ByteScout

ByteScout PDF Extractor SDK – C# – Find Keyword And Extract Text in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – C# – Find Keyword And Extract Text in PDF

How to find keyword and extract text in PDF in C# and ByteScout PDF Extractor SDK

The tutorial below will demonstrate how to find keyword and extract text in PDF in C#

Learn how to find keyword and extract text in PDF 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 find keyword and extract text in PDF in C#.

The SDK samples like this one below explain how to quickly make your application do find keyword and extract text in PDF in C# with the help of ByteScout PDF Extractor SDK. In your C# project or application you may simply copy & paste the code and then run your app! Test C# sample code examples whether they respond your needs and requirements for the project.

ByteScout free trial version is available for download from our website. It includes all these programming tutorials along with source code samples.

Try ByteScout PDF Extractor SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

Program.cs
      
using System; using System.Drawing; using Bytescout.PDFExtractor; namespace FindText { class Program { static void Main(string[] args) { // Create Bytescout.PDFExtractor.TextExtractor instance TextExtractor extractor = new TextExtractor(); extractor.RegistrationName = "demo"; extractor.RegistrationKey = "demo"; // Load sample PDF document extractor.LoadDocumentFromFile(@".\sample2.pdf"); int pageCount = extractor.GetPageCount(); // Search each page for some keyword for (int i = 0; i < pageCount; i++) { if (extractor.Find(i, "References", false)) { // If page contains the keyword, extract a text from it. // For demonstration we'll extract the text from top part of the page only extractor.SetExtractionArea(0, 0, 600, 200); string text = extractor.GetTextFromPage(i); Console.WriteLine(text); } } // Cleanup extractor.Dispose(); Console.WriteLine(); Console.WriteLine("Press any key to continue..."); Console.ReadLine(); } } }

Try ByteScout PDF Extractor SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

Get 60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Get ByteScout PDF Extractor SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next