enterTextSelectionMode

open fun enterTextSelectionMode(@IntRange(from = 0) pageIndex: Int, @NonNull textRange: Range)

Sets the current text selection. Once you invoke this method, you'll get (through registered ) which provides methods for managing text selection actions.

Parameters

pageIndex

Number of the page on which text selection should be performed. Has to be 0 <= pageIndex

textRange

0-based range spanning the text which should be selected. Range has to be in the interval [0, textLength].

Throws

If pageIndex is not in the page range.


open fun enterTextSelectionMode(pageIndex: Int, @NonNull touchedTextRects: TextSelectionRectangles)

Sets the current text selection. Once you invoke this method, you'll get (through registered ) which provides methods for managing text selection actions.

Parameters

pageIndex

Number of the page on which text selection should be performed. Has to be 0 <= pageIndex

touchedTextRects

List of rectangles (in PDF coordinates) under which text selection is to be performed

Throws

If pageIndex is not in the page range, or if text rectangles on page don't contain any of @{code touchedTextRects}.