The sample shows steps and algorithm of how to convert PDF to XML with images and how to make it work in your VBScript application. ByteScout PDF Extractor SDK is the SDK is designed to help developers with pdf tables and pdf data extraction from unstructured documents like pdf, tiff, scans, images, scanned and electronic forms. The library is powered by OCR, computer vision and AI to provide unique functionality like table detection, automatic table structure extraction, data restoration, data restructuring and reconstruction. Supports PDF, TIFF, PNG, JPG images as input and can output CSV, XML, JSON formatted data. Includes full set of utilities like pdf splitter, pdf merger, searchable pdf maker and other utilities. It can convert PDF to XML with images in VBScript.
Fast application programming interfaces of ByteScout PDF Extractor SDK for VBScript plus the instruction and the code below will help you quickly learn how to convert PDF to XML with images. This VBScript sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Implementing VBScript application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.
Download free trial version of ByteScout PDF Extractor SDK from our website with this and other source code samples for VBScript.
' Create Bytescout.PDFExtractor.XMLExtractor object Set extractor = CreateObject("Bytescout.PDFExtractor.XMLExtractor") extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" ' Load sample PDF document extractor.LoadDocumentFromFile "../../sample1.pdf" ' Uncomment this line to get rid of empty nodes in XML 'extractor.PreserveFormattingOnTextExtraction = False ' Set output image format extractor.ImageFormat = 0 ' 0 = PNG; 1 = JPEG; 2 = GIF; 3 = BMP ' Save images to external files extractor.SaveImages = 1 ' 1 = ImageHandling.OuterFile extractor.ImageFolder = "images" ' Folder for external images extractor.SaveXMLToFile "result_with_external_images.xml" ' Embed images into XML as Base64 encoded string extractor.SaveImages = 2 ' 2 = ImageHandling.Embed extractor.SaveXMLToFile "result_with_embedded_images.xml" WScript.Echo "Done."