This sample source code below will display you how to extract images from pdf with pdf extractor sdk in VBScript. What is ByteScout Premium Suite? It is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can help you to extract images from pdf with pdf extractor sdk in your VBScript application.
The SDK samples given below describe how to quickly make your application do extract images from pdf with pdf extractor sdk in VBScript with the help of ByteScout Premium Suite. Follow the instructions from scratch to work and copy the VBScript code. 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.
The trial version of ByteScout Premium Suite can be downloaded for free from our website. It also includes source code samples for VBScript and other programming languages.
' 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 outputFileName = "image" & i & ".png" ' Save image to file extractor.SaveCurrentImageToFile outputFileName i = i + 1 Loop While extractor.GetNextImage() ' Advance image enumeration End If ' Open first output image in default associated application Set shell = CreateObject("WScript.Shell") shell.Run "image0.png", 1, false Set shell = Nothing Set extractor = Nothing