This prolific sample source code in VBScript for ByteScout PDF Suite contains various functions and other necessary options you should do calling the API to extract images coordinates from pdf with pdf extractor sdk. IF you want to implement the functionality, just copy and paste this code for VBScript below into your code editor with your app, compile and run your application. Applying VBScript application mostly includes various stages of the software development so even if the functionality works please test it with your data and the production environment.
You can download free trial version of ByteScout PDF 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") i = 0 ' Initialize image enumeration If extractor.GetFirstImage() Then Do ' display coordinates of the image MsgBox "Image #" & CStr(i) & vbCRLF & "Coordinates: " & CStr( extractor.GetCurrentImageRectangle_Left()) & ", " & _ CStr( extractor.GetCurrentImageRectangle_Top()) & ", " & CStr( extractor.GetCurrentImageRectangle_Width()) & ", " & _ CStr( extractor.GetCurrentImageRectangle_Height()) i = i + 1 Loop While extractor.GetNextImage() ' Advance image enumeration End If Set extractor = Nothing