PdfPage

class PdfPage

Lightweight page descriptor. It does not keep a native PDFium page open.

Properties

Link copied to clipboard

Document this page belongs to.

Link copied to clipboard
val index: Int

Zero-based index of the page.

Functions

Link copied to clipboard
suspend fun extractText(range: PdfTextRange? = null): String

Returns the page text, or only the slice described by range when it is non-null.

Link copied to clipboard
suspend fun information(): PdfPageInfo

Returns the page geometry: size, rotation, and bounding box.

Link copied to clipboard
suspend fun links(): List<PdfLink>

Returns the link annotations of this page.

Link copied to clipboard
suspend fun render(request: PdfRenderRequest): PdfBitmap

Renders the full page into a new bitmap following request.

Link copied to clipboard
suspend fun search(query: String, options: PdfSearchOptions = PdfSearchOptions()): List<PdfSearchMatch>

Returns every match of query on this page, ordered by position.

Link copied to clipboard
suspend fun textLayout(): PdfTextLayout

Returns the page text with per-character geometry.

Link copied to clipboard
suspend fun thumbnail(maximumSize: PdfPixelSize): PdfBitmap?

Returns the embedded thumbnail scaled to fit maximumSize, or null when the page has none.