Index PDF files is easy to implement in VBScript if you use these source codes below. ByteScout PDF Extractor SDK is the Software Development Kit (SDK) that is designed to help developers with 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. It can be used to index PDF files using 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 index PDF files. 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! You can use these VBScript sample examples in one or many applications.
Our website provides trial version of ByteScout PDF Extractor SDK for free. It also includes documentation and source code samples.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
' Create Bytescout.PDFExtractor.InfoExtractor object
Set infoExtractor = CreateObject("Bytescout.PDFExtractor.InfoExtractor")
infoExtractor.RegistrationName = "demo"
infoExtractor.RegistrationKey = "demo"
' Create Bytescout.PDFExtractor.TextExtractor object
Set textExtractor = CreateObject("Bytescout.PDFExtractor.TextExtractor")
textExtractor.RegistrationName = "demo"
textExtractor.RegistrationKey = "demo"
' Create File System object
Set FSO = CreateObject("Scripting.FileSystemObject")
' Get folder object
Set objFolder = FSO.GetFolder("..\..")
' Get file list
Set files = objFolder.Files
' Create output file
Set textFile = FSO.CreateTextFile("output.txt", True, True)
For Each file in files
ext = UCase(FSO.GetExtensionName(file))
If ext = "PDF" Then
infoExtractor.LoadDocumentFromFile(file)
textFile.WriteLine("File Name: " & FSO.GetFileName(file))
textFile.WriteLine("Page Count: " & infoExtractor.GetPageCount())
textFile.WriteLine("Author: " & infoExtractor.Author)
textFile.WriteLine("Title: " & infoExtractor.Title)
textFile.WriteLine("Producer: " & infoExtractor.Producer)
textFile.WriteLine("Subject: " & infoExtractor.Subject)
textFile.WriteLine("CreationDate: " & infoExtractor.CreationDate)
textExtractor.LoadDocumentFromFile(file)
text = textExtractor.GetTextFromPage(0)
If len(text) > 0 Then
textFile.WriteLine("Text (first 200 chars): ")
textFile.WriteLine(Mid(text, 1, 200))
End If
textFile.WriteBlankLines(2)
End If
Next
textFile.Close
Set infoExtractor = Nothing
Set textExtractor = Nothing
Set FSO = Nothing
WScript.Echo "Done."
60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page
Explore ByteScout PDF Extractor SDK Documentation
Explore Samples
Sign Up for ByteScout PDF Extractor SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page
Explore ByteScout PDF Extractor SDK Documentation
Explore Samples
Sign Up for ByteScout PDF Extractor SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: