MakeSearchablePDF.vbs
' Create Bytescout.PDFExtractor.SearchablePDFMaker object
Set searchablePDFMaker = CreateObject("Bytescout.PDFExtractor.SearchablePDFMaker")
searchablePDFMaker.RegistrationName = "demo"
searchablePDFMaker.RegistrationKey = "demo"
' Load sample PDF document
searchablePDFMaker.LoadDocumentFromFile("..\..\sample_ocr.pdf")
' Set the location of "tessdata" folder containing language data files
searchablePDFMaker.OCRLanguageDataFolder = "c:\Program Files\Bytescout PDF Extractor SDK\Redistributable\net2.00\tessdata"
' Set OCR language
' "eng" for english, "deu" for German, "fra" for French, "spa" for Spanish etc - according to files in "tessdata" folder.
searchablePDFMaker.OCRLanguage = "eng"
' Find more language files at https://github.com/tesseract-ocr/tessdata/tree/3.04.00
' Set PDF document rendering resolution
searchablePDFMaker.OCRResolution = 300
' Process the document
searchablePDFMaker.MakePDFSearchable("result.pdf")
WScript.Echo "Searchable document saved as 'result.pdf'."
Click here to get your Free Trial version of the SDK
also available as: