pdfrx_web
    Preparing search index...

    Interface PdfTextSelection

    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.

    interface PdfTextSelection {
        isEmpty: boolean;
        range: PdfTextSelectionRange | null;
        getSelectedText(): Promise<string>;
        getSelectedTextRanges(): Promise<PdfSelectedTextRange[]>;
    }
    Index
    isEmpty: boolean

    True when nothing is selected.

    range: PdfTextSelectionRange | null

    The selection endpoints (start precedes end), or null when isEmpty. Cheap: derived from internal state without touching page text.