ByteScout PDF Extractor SDK - Microsoft Excel - Extract Text From Coordinates from PDF - ByteScout

ByteScout PDF Extractor SDK – Microsoft Excel – Extract Text From Coordinates from PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – Microsoft Excel – Extract Text From Coordinates from PDF

How to extract text from coordinates from PDF in Microsoft Excel using ByteScout PDF Extractor SDK

This code in Microsoft Excel shows how to extract text from coordinates from PDF with this how to tutorial

With this source code sample you may quickly learn how to extract text from coordinates from PDF in Microsoft Excel. 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 and you can use it to extract text from coordinates from PDF with Microsoft Excel.

Microsoft Excel code samples for Microsoft Excel developers help to speed up coding of your application when using ByteScout PDF Extractor SDK. In your Microsoft Excel project or application you may simply copy & paste the code and then run your app! Enjoy writing a code with ready-to-use sample codes in Microsoft Excel.

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)

ExtractTextFromPDF_VBA.txt
      
' IMPORTANT: This demo uses VBA so if you have it disabled please temporary enable ' by going to Tools - Macro - Security.. and changing the security mode to ""Medium"" ' to Ask if you want enable macro or not. Then close and reopen this Excel document ' You should have evaluation version of the ByteScout SDK installed to get it working - get it from https://bytescout.com ' If you are getting error message like ' "File or assembly named Bytescout SDK, or one of its dependencies, was not found" ' then please try the following: ' ' - Close Excel ' - (for Office 2003 only) download and install this hotfix from Microsoft: ' http://www.microsoft.com/downloads/details.aspx?FamilyId=1B0BFB35-C252-43CC-8A2A-6A64D6AC4670&displaylang=en ' ' and then try again! ' ' If you have any questions please contact us at https://bytescout.com/support/ or at support@bytescout.com '============================================== 'References used '================= 'Bytescout PDF Extractor SDK ' ' IMPORTANT: ' ============================================================== '1) Add the ActiveX reference in Tools -> References ' '================================================================== Private Sub CommandButton1_Click() ' Create TextExtractor object ' Set extractor = CreateObject("Bytescout.PDFExtractor.TextExtractor") Dim extractor As New Bytescout_PDFExtractor.TextExtractor extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" ' Load sample PDF document extractor.LoadDocumentFromFile ("c:\sample1.pdf") ' Get page count pageCount = extractor.GetPageCount() Dim wb As Workbook Dim ws As Worksheet Dim TxtRng As Range Set wb = ActiveWorkbook Set ws = wb.Sheets("Sheet1") For i = 0 To pageCount - 1 RectLeft = 10 RectTop = 10 RectWidth = 100 RectHeight = 100 ' check the same text is extracted from returned coordinates extractor.SetExtractionArea RectLeft, RectTop, RectWidth, RectHeight ' extract text from given area extractedText = extractor.GetTextFromPage(i) ' insert rows ' Rows(1).Insert shift:=xlShiftDown ' write cell value Set TxtRng = ws.Range("A" & CStr(i + 2)) TxtRng.Value = extractedText Next Set extractor = Nothing End Sub

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