pdfrx_web
    Preparing search index...

    Interface PdfSelection

    Selection state and actions returned by usePdfSelection.

    interface PdfSelection {
        clear: () => void;
        copy: () => Promise<boolean>;
        isEmpty: boolean;
        isResolving: boolean;
        range: PdfTextSelectionRange | null;
        ranges: readonly PdfSelectedTextRange[];
        selectAll: () => Promise<void>;
        text: string;
    }
    Index
    clear: () => void

    Clears the selection.

    copy: () => Promise<boolean>

    Copies the selection to the clipboard. Resolves false if empty or copying is not permitted.

    isEmpty: boolean

    Whether the selection is empty.

    isResolving: boolean

    Whether text/ranges are still being resolved for the current range.

    range: PdfTextSelectionRange | null

    The selected span as page/character endpoints, or null when nothing is selected.

    ranges: readonly PdfSelectedTextRange[]

    Per-page pieces of the selection, with bounds and character rects for drawing your own UI.

    selectAll: () => Promise<void>

    Selects the whole document (loads every page's text).

    text: string

    The selected text, or ''. Resolved asynchronously — see the note below.