ByteScout PDF Extractor SDK - VBScript - Index PDF Files - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout PDF Extractor SDK – VBScript – Index PDF Files

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – VBScript – Index PDF Files

How to index PDF files in VBScript using ByteScout PDF Extractor SDK

This code in VBScript shows how to index PDF files with this how to tutorial

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)

Index PDF Files.vbs
      
' 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."

ON-PREMISE OFFLINE SDK

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

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

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

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next