ByteScout PDF Extractor SDK - VBScript - Index PDF Files - ByteScout

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.

Try ByteScout PDF Extractor SDK today: Get 60 Day Free Trial or sign up for Web API

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."

Try ByteScout PDF Extractor SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout PDF Extractor SDK page

Explore ByteScout PDF Extractor SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next