extractTextFromPage
Extract text from a specified rectangle.
extractTextFromPage([in] int page, [in] double x0, [in] double y0,
[in] double x1, [in] double y1, [out, retval] BSTR *text)
This function returns the text inside a specified rectangle on a
specified page. The rectangle coordinates are in the PDF coordinate
space (see
convertWindowToPDFCoords2
).
The text will be in the encoding set in the textEncoding
property.
extractTextFromPage
will throw an error if text
extraction is not allowed by the PDF file.
VB:
Dim page As Long
Dim x0 As Double, y0 As Double, x1 As Double, y1 As Double
If viewer.getCurrentSelection2(page, x0, y0, x1, y1) Then
Clipboard.SetText(viewer.extractTextFromPage(page, x0, y0, x1, y1))
End If