The sample shows instructions and algorithm of how to extract text from coordinates from PDF with PDF extractor SDK and how to make it run in your Microsoft Excel application. ByteScout PDF Suite is the bundle that provides six different SDK libraries to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript. It can be applied to extract text from coordinates from PDF with PDF extractor SDK using Microsoft Excel.
This prolific sample source code in Microsoft Excel for ByteScout PDF Suite contains various functions and other necessary options you should do calling the API to extract text from coordinates from PDF with PDF extractor SDK. Follow the instructions from scratch to work and copy the Microsoft Excel code. Want to see how it works with your data then code testing will allow the function to be tested and work properly.
Trial version of ByteScout PDF Suite is available for free. Source code samples are included to help you with your Microsoft Excel app.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
' 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
60 Day Free Trial or Visit ByteScout PDF Suite Home Page
Explore ByteScout PDF Suite Documentation
Explore Samples
Sign Up for ByteScout PDF Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout PDF Suite Home Page
Explore ByteScout PDF Suite Documentation
Explore Samples
Sign Up for ByteScout PDF Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: