ByteScout PDF Extractor SDK - C# - Extract Text From PDF By Pages - ByteScout

ByteScout PDF Extractor SDK – C# – Extract Text From PDF By Pages

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – C# – Extract Text From PDF By Pages

How to extract text from PDF by pages in C# with ByteScout PDF Extractor SDK

The tutorial below will demonstrate how to extract text from PDF by pages in C#

With this source code sample you may quickly learn how to extract text from PDF by pages in C#. 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 extract text from PDF by pages using C#.

C# code samples for C# developers help to speed up coding of your application when using ByteScout PDF Extractor SDK. Follow the instructions from the scratch to work and copy the C# code. Use of ByteScout PDF Extractor SDK in C# is also explained in the documentation included along with the product.

Free trial version of ByteScout PDF Extractor SDK is available for download from our website. Get it to try other source code samples for C#.

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

Program.cs
      
using System; using Bytescout.PDFExtractor; using System.Diagnostics; namespace ExtractTextByPages { 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"); // Get page count int pageCount = extractor.GetPageCount(); for (int i = 0; i < pageCount; i++) { string fileName = "page" + i + ".txt"; // Save extracted page text to file extractor.SavePageTextToFile(i, fileName); } // Cleanup extractor.Dispose(); // Open first output file in default associated application ProcessStartInfo processStartInfo = new ProcessStartInfo(@".\page1.txt"); 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