ByteScout PDF Suite - VBScript - Index pdf files with pdf extractor sdk - 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 Suite – VBScript – Index pdf files with pdf extractor sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – VBScript – Index pdf files with pdf extractor sdk

How to index pdf files with pdf extractor sdk in VBScript with ByteScout PDF Suite

Learn to index pdf files with pdf extractor sdk in VBScript

Source code documentation samples give simple and easy method to install a needed feature into your application. ByteScout PDF Suite: the set that includes 6 SDK products to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript. It can index pdf files with pdf extractor sdk in VBScript.

The SDK samples given below describe how to quickly make your application do index pdf files with pdf extractor sdk in VBScript with the help of ByteScout PDF Suite. Simply copy and paste in your VBScript project or application you and then run your app! Applying VBScript application mostly includes various stages of the software development so even if the functionality works please test it with your data and the production environment.

You can download free trial version of ByteScout PDF Suite from our website to see and try many others source code samples for VBScript.

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 Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite 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 Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next