getWordAtPoint

abstract fun getWordAtPoint(pageIndex: Int, x: Float, y: Float, tolerance: Float, markupPadding: Boolean = true): DocumentTextProvider.TextRange?

Looks for a word at the given point.

Return

The TextRange of the word if one was found, or null if otherwise.

Parameters

pageIndex

Page number of the page, zero indexed.

x

X coordinate in PDF point units

y

Y coordinate in PDF point units

markupPadding

Take the font height into account in the rects to make better suited for being displayed around the text.