extractTextFromRect2
Extract text from a rectangular region.
extractTextFromRect2([in] int page, [in] double x0, [in] double y0,
[in] double x1, [in] double y1, [out, retval] BSTR *text)
This function extracts text from a rectangular region on a page, and
returns the resulting text in a string.
The rectangle is defined by two opposite corners: (x0,
y0)
and (x1, y1)
. The coordinates are in PDF
coordinate space.
extractTextFromRect
throws an error if text extraction is
prohibited by this PDF file.
See the "Setting parameters" section in the function list for settings that affect text extraction.
This function is identical to extractTextFromRect
except that it
takes points in PDF coordinate space.
VB:
Dim s As String
' extract a rectangle 4" from the left side, 1" up from
' the bottom, 2" wide, 0.5" high, on page 1
s = pdf.extractTextFromRect2(1, 4*72, 1*72, 6*72, 1.5*72)