PdfToTextConverterExtractTextAtCoords(Stream, Int32, Double, Double, Double, Double) Method |
Extracts the text from the specified page and coordinates.
Namespace: ExpertPdfAssembly: eppdftotext (in eppdftotext.dll) Version: 10.0
Syntaxpublic string ExtractTextAtCoords(
Stream pdfStream,
int pageNumber,
double X,
double Y,
double width,
double height
)
Public Function ExtractTextAtCoords (
pdfStream As Stream,
pageNumber As Integer,
X As Double,
Y As Double,
width As Double,
height As Double
) As String
Parameters
- pdfStream Stream
- The binary stream providing the PDF document bytes. It can be for example a
FileStream to convert a PDF file to text or a MemoryStream to convert the PDF document
represented as an array of bytes to text.
- pageNumber Int32
- Page number (starting with 1).
- X Double
- X-coordinate of the crop area top left corner.
- Y Double
- Y-coordinate of the crop area top left corner.
- width Double
- Width of crop area in points.
- height Double
- Height of crop area in points.
Return Value
StringThe text extracted from the specified crop area of the PDF document.
Exceptions| Exception | Condition |
|---|
| PdfToTextException | The document cannot be read, or the page number is not a page of the document. |
RemarksWithout a license key only the first 5 pages are read, as by the other methods: the area of a later
page gives the evaluation notice alone.
See Also