The below SDK samples describe how to quickly make your application do pdf extraction profiles with pdf extractor sdk in VBScript with the help of ByteScout PDF Suite. To use pdf extraction profiles with pdf extractor sdk in your VBScript project or application just copy & paste the code and then run your app! Further improvement of the code will make it more robust.
ByteScout PDF Suite is available as a free trial. You may get it from our website along with all other source code samples for VBScript applications.
' This example demonstrates the use of profiles. Profiles are set of properties ' allowing to apply them to Extractor in any combination quickly. You can use ' predefined profiles or create you own in JSON format like in this example. ' Create Bytescout.PDFExtractor.TextExtractor object Set extractor = CreateObject("Bytescout.PDFExtractor.TextExtractor") extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" extractor.OCRLanguageDataFolder = "c:\Program Files\Bytescout PDF Extractor SDK\ocrdata" ' Load sample PDF document extractor.LoadDocumentFromFile("..\..\sample_ocr.pdf") ' Apply predefined profiles extractor.Profiles = "scanned, no-layout" ' Extract text to file extractor.SaveTextToFile("result1.txt") extractor.Reset ' Load another document extractor.LoadDocumentFromFile("..\..\sample_ocr.pdf") ' Load and apply custom profiles extractor.LoadProfiles("profiles.json") extractor.Profiles = "keep-formatting, ocr-forced-200dpi" ' Extract text to file extractor.SaveTextToFile("result2.txt")