ByteScout Premium Suite - C# - Extract PDF Text From Page Area with PDF Extractor SDK - ByteScout

ByteScout Premium Suite – C# – Extract PDF Text From Page Area with PDF Extractor SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – C# – Extract PDF Text From Page Area with PDF Extractor SDK

How to extract PDF text from page area with PDF extractor SDK in C# and ByteScout Premium Suite

Learn to code in C# to extract PDF text from page area with PDF extractor SDK with this step-by-step tutorial

ByteScout simple and easy to understand tutorials are planned to describe the code for both C# beginners and advanced programmers. ByteScout Premium Suite: the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can extract PDF text from page area with PDF extractor SDK in C#.

These C# code samples for C# guide developers to speed up coding of the application when using ByteScout Premium Suite. 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.

The trial version of ByteScout Premium Suite can be downloaded for free from our website. It also includes source code samples for C# and other programming languages.

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; using Bytescout.PDFExtractor; using System.Drawing; namespace ExtractTextFromPageArea { class Program { static void Main(string[] args) { TextExtractor extractor = new TextExtractor("demo", "demo"); // Load document extractor.LoadDocumentFromFile(@".\sample2.pdf"); // Get page count int pageCount = extractor.GetPageCount(); // Iterate through pages for (int i = 0; i < pageCount; i++) { // Define rectangle location to extract from RectangleF location = new RectangleF(0, 0, 200, 200); // Set extraction area extractor.SetExtractionArea(location); // Extract text from the extraction area string text = extractor.GetTextFromPage(i); Console.WriteLine("Extracted from page #" + i + ":"); Console.WriteLine(); Console.WriteLine(text); // Reset the extraction area extractor.ResetExtractionArea(); Console.WriteLine(); } // Cleanup extractor.Dispose(); Console.WriteLine("Press any key to exit..."); Console.ReadKey(); } } }

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