getPageText

abstract fun getPageText(@IntRange(from = 0) pageIndex: Int): String

Returns text content of the document page.

Return

Text on the page. Text lines end with CRLF (`\r\n`).

Parameters

pageIndex

0-indexed page number.


abstract fun getPageText(@IntRange(from = 0) pageIndex: Int, start: Int, length: Int): String

Returns text content between two character indexes. Use getPageTextLength to determine the number of characters on page.

Return

Text on the page between passed ranges. Text lines end with CRLF (`\r\n`).

Parameters

pageIndex

0-indexed page number.

start

Index of first character in the range.

length

Length of the range.


abstract fun getPageText(@IntRange(from = 0) pageIndex: Int, @NonNull rectF: RectF): String

Returns text content inside given page rectangle.

Return

Text on the page inside given page rect. Text lines end with CRLF (`\r\n`).

Parameters

pageIndex

0-indexed page number.

rectF

Page rectangle in the PDF coordinates.