ByteScout PDF Extractor SDK - VBScript - Extract Text From Page Area - 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 – Extract Text From Page Area

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – VBScript – Extract Text From Page Area

ByteScout PDF Extractor SDK – VBScript – Extract Text From Page Area

ExtractTextFromPageArea.vbs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
' Create TextExtractor object
Set extractor = CreateObject("Bytescout.PDFExtractor.TextExtractor")
extractor.RegistrationName = "demo"
extractor.RegistrationKey = "demo"
 
' Load sample PDF document
extractor.LoadDocumentFromFile("..\..\sample1.pdf")
 
' Get page count
pageCount = extractor.GetPageCount()
 
' Iterate through pages
For i = 0 to pageCount - 1
 
    ' Set extraction area (in Points. 1 Point = 1/72 in.)
    extractor.SetExtractionArea 0, 0, 200, 200
     
    ' Extract text from the extraction area
    text = extractor.GetTextFromPage(i)
 
    Wscript.echo "Page #" & CStr(i) & " text from area (0, 0, 200, 200): " & vbCr & vbLf & text
 
    extractor.ResetExtractionArea
     
Next
 
Set extractor = Nothing

  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next