Every ByteScout tool includes simple example VBScript source codes that you can get here or in the folder with installed ByteScout product. ByteScout Data Extraction Suite is the set that includes 3 SDK products for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK and you can use it to extract image coordinates by page from pdf with pdf extractor sdk with VBScript.
Want to quickly learn? This fast application programming interfaces of ByteScout Data Extraction Suite for VBScript plus the guidelines and the code below will help you quickly learn how to extract image coordinates by page from pdf with pdf extractor sdk. Just copy and paste the code into your VBScript application’s code and follow the instructions. Use of ByteScout Data Extraction Suite in VBScript is also described in the documentation included along with the product.
You can download free trial version of ByteScout Data Extraction Suite from our website to see and try many others source code samples for VBScript.
' Create Bytescout.PDFExtractor.ImageExtractor object Set extractor = CreateObject("Bytescout.PDFExtractor.ImageExtractor") extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" ' Load sample PDF document extractor.LoadDocumentFromFile("..\..\sample1.pdf") ' Get page count pageCount = extractor.GetPageCount() ' Extract images from each page For i = 0 To pageCount - 1 j = 0 ' Initialize page images enumeration If extractor.GetFirstPageImage(i) Then Do outputFileName = "page" & i & "image" & j & ".png" ' display coordinates of the image MsgBox "Image #" & CStr(j) & " on page #" & CStr(i) & vbCRLF & "Coordinates: " & _ CStr( extractor.GetCurrentImageRectangle_Left()) & ", " & CStr( extractor.GetCurrentImageRectangle_Top()) & ", " & _ CStr( extractor.GetCurrentImageRectangle_Width()) & ", " & CStr( extractor.GetCurrentImageRectangle_Height()) j = j + 1 Loop While extractor.GetNextImage() ' Advance image enumeration End If Next Set extractor = Nothing