BCL easyPDF SDK
easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

ExtractText2 Method

Extract text from specified coordinate in a PDF file.

Function ExtractText2(InputFileName As String,
                      Page As Long,
                      Left As Double,
                      Top As Double,
                      Right As Double,
                      Bottom As Double,
                      [Password] As String) As String

String ExtractText2(string InputFileName,
                    int Page,
                    double Left,
                    double Top,
                    double Right,
                    double Bottom,
                    string Password)

String ExtractText2(String InputFileName,
                    int Page,
                    double Left,
                    double Top,
                    double Right,
                    double Bottom,
                    String Password) throws PDFProcessorException

Parameters

Return Values

Extracted text.

Remarks

Coordinate system information:

  1. The unit size of PDF user space is 1/72 inch (1 inch = 72 PDF user space unit).
  2. The location of the origin (0, 0) is at top-left corner.
  3. To get page size information from a PDF file, use GetPageSize method.
    The page number uses zero-based index, meaning that page number starts from 0.

Example Usage

Set oProcessor = CreateObject("easyPDF.PDFProcessor.8")
 
sText = oProcessor.ExtractText2 "C:\test\input.pdf", _
                                0, _
                                50, _
                                80, _
                                370, _
                                100
 
MsgBox "Extracted text: " + vbLF + sText