ByteScout Premium Suite - VB.NET - Find table in pdf and extract as csv with pdf extractor sdk - ByteScout

ByteScout Premium Suite – VB.NET – Find table in pdf and extract as csv with pdf extractor sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – VB.NET – Find table in pdf and extract as csv with pdf extractor sdk

How to find table in pdf and extract as csv with pdf extractor sdk in VB.NET with ByteScout Premium Suite

Learning is essential in computer world and the tutorial below will demonstrate how to find table in pdf and extract as csv with pdf extractor sdk in VB.NET

Find table in pdf and extract as csv with pdf extractor sdk is simple to apply in VB.NET if you use these source codes below. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can find table in pdf and extract as csv with pdf extractor sdk in VB.NET.

The SDK samples given below describe how to quickly make your application do find table in pdf and extract as csv with pdf extractor sdk in VB.NET with the help of ByteScout Premium Suite. Simply copy and paste in your VB.NET project or application you and then run your app! This basic programming language sample code for VB.NET will do the whole work for you to find table in pdf and extract as csv with pdf extractor sdk.

If you want to try other source code samples then the free trial version of ByteScout Premium Suite is available for download from our website. Just try other source code samples for VB.NET.

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 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