ByteScout PDF Extractor SDK - C# - Extract Table Structure from PDF - ByteScout

ByteScout PDF Extractor SDK – C# – Extract Table Structure from PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – C# – Extract Table Structure from PDF

How to extract table structure from PDF in C# using ByteScout PDF Extractor SDK

This code in C# shows how to extract table structure from PDF with this how to tutorial

These sample source codes on this page below are demonstrating how to extract table structure from PDF in C#. ByteScout PDF Extractor SDK can extract table structure from PDF. It can be used from C#. ByteScout PDF Extractor SDK is the SDK that helps developers to extract data from unstructured documents, pdf, images, scanned and electronic forms. Includes AI functions like automatic table detection, automatic table extraction and restructuring, text recognition and text restoration from pdf and scanned documents. Includes PDF to CSV, PDF to XML, PDF to JSON, PDF to searchable PDF functions as well as methods for low level data extraction.

C# code samples for C# developers help to speed up coding of your application when using ByteScout PDF Extractor SDK. In order to implement the functionality, you should copy and paste this code for C# below into your code editor with your app, compile and run your application. You can use these C# sample examples in one or many applications.

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

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 Bytescout.PDFExtractor; using System.Diagnostics; using System; namespace TableStructure { class Program { static void Main(string[] args) { // Create Bytescout.PDFExtractor.StructuredExtractor instance StructuredExtractor extractor = new StructuredExtractor(); extractor.RegistrationName = "demo"; extractor.RegistrationKey = "demo"; // Load sample PDF document extractor.LoadDocumentFromFile(@".\sample3.pdf"); for (int pageIndex = 0; pageIndex < extractor.GetPageCount(); pageIndex++) { Console.WriteLine("Starting extraction from page #" + pageIndex); Console.WriteLine(); extractor.PrepareStructure(pageIndex); int rowCount = extractor.GetRowCount(pageIndex); for (int row = 0; row < rowCount; row++) { int columnCount = extractor.GetColumnCount(pageIndex, row); for (int col = 0; col < columnCount; col++) { Console.WriteLine(extractor.GetCellValue(pageIndex, row, col)); } } } // Cleanup extractor.Dispose(); Console.WriteLine(); Console.WriteLine("Press any key.."); Console.ReadKey(); } } }

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