ByteScout PDF Extractor SDK - VB.NET - Find Table in PDF And Extract As CSV - ByteScout

ByteScout PDF Extractor SDK – VB.NET – Find Table in PDF And Extract As CSV

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – VB.NET – Find Table in PDF And Extract As CSV

How to find table in PDF and extract as CSV in VB.NET using ByteScout PDF Extractor SDK

How to code in VB.NET to find table in PDF and extract as CSV with this step-by-step tutorial

We made thousands of pre-made source code pieces for easy implementation in your own programming projects. 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 table in PDF and extract as CSV in VB.NET.

You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout PDF Extractor SDK for find table in PDF and extract as CSV below and use it in your application. In your VB.NET project or application you may simply copy & paste the code and then run your app! Enjoy writing a code with ready-to-use sample VB.NET codes.

Our website provides trial version of ByteScout PDF Extractor SDK for free. It also includes documentation and 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.vb
      
Imports Bytescout.PDFExtractor Class Program Friend Shared Sub Main(args As String()) ' Create Bytescout.PDFExtractor.CSVExtractor instance Dim csvExtractor As New CSVExtractor() csvExtractor.RegistrationName = "demo" csvExtractor.RegistrationKey = "demo" ' Create Bytescout.PDFExtractor.TableDetector instance Dim tableDetector As New TableDetector() tableDetector.RegistrationName = "demo" tableDetector.RegistrationKey = "demo" ' We should define what kind of tables we should detect. ' So we set min required number of columns to 3 ... tableDetector.DetectionMinNumberOfColumns = 3 ' ... and we set min required number of rows to 3 tableDetector.DetectionMinNumberOfRows = 3 ' Set table detection mode to "bordered tables" - best for tables with closed solid borders. tableDetector.ColumnDetectionMode = ColumnDetectionMode.BorderedTables ' Load sample PDF document csvExtractor.LoadDocumentFromFile(".\sample3.pdf") tableDetector.LoadDocumentFromFile(".\sample3.pdf") ' Get page count Dim pageCount As Integer = tableDetector.GetPageCount() ' Iterate through pages For i As Integer = 0 To pageCount - 1 Dim t As Integer = 1 ' Find first table and continue if found If (tableDetector.FindTable(i)) Then Do ' Set extraction area for CSV extractor to rectangle received from the table detector csvExtractor.SetExtractionArea(tableDetector.FoundTableLocation) ' Export the table to CSV file csvExtractor.SavePageCSVToFile(i, "page-" + i.ToString() + "-table-" + t.ToString() + ".csv") t = t + 1 Loop While tableDetector.FindNextTable() End If Next ' Cleanup csvExtractor.Dispose() tableDetector.Dispose() ' Open first output file in default associated application (for demo purposes) System.Diagnostics.Process.Start("page-0-table-1.csv") End Sub End Class

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