ReadonlyisTrue when nothing is selected.
ReadonlyrangeThe selection endpoints (start precedes end), or null when
isEmpty. Cheap: derived from internal state without touching page
text.
Resolves the full selected text across pages in reading order (empty string when isEmpty). See getSelectedTextRanges for why it is async.
The resolved Promise.
Resolves the selection into per-page ranges with text and geometry (each
range's bounds give the selected
text's location in PDF page coordinates). Loads the text of fully-covered
intermediate pages as needed, hence async. Returns [] when isEmpty.
The resolved Promise.
A snapshot of the text-selection state, delivered to PdfrxViewer.addSelectionChangeListener listeners and returned by PdfrxViewer.selection.
Following pdfrx, this object holds only the selection endpoints (range); it does not eagerly compute the selected text. Resolving text and per-page geometry — which can be comparatively expensive and may need to load the text of pages between the endpoints — is deferred to the explicit async getSelectedText / getSelectedTextRanges methods.