pdfrx_web
    Preparing search index...

    Interface PdfDocumentState

    The document state returned by usePdfDocument.

    interface PdfDocumentState {
        clearError: () => void;
        document: PdfDocument | null;
        error: unknown;
        isAnnotationEditingAllowed: boolean;
        isCopyAllowed: boolean;
        isDocumentAssemblyAllowed: boolean;
        isLoading: boolean;
        isPrintAllowed: boolean;
        open: (src: PdfSource) => Promise<void>;
        pageCount: number;
        progress: PdfLoadingProgress | null;
        sourceName: string | null;
    }
    Index
    clearError: () => void

    Clears error — e.g. when the user dismisses an error banner.

    document: PdfDocument | null

    The open document, or null before the first successful load.

    error: unknown

    The error from the most recent open attempt, or null.

    isAnnotationEditingAllowed: boolean

    Whether annotation and form edits are allowed by the PDF permission flags.

    isCopyAllowed: boolean

    Whether the document's permissions allow copying text.

    isDocumentAssemblyAllowed: boolean

    Whether page assembly/editing is allowed by the PDF permission flags.

    isLoading: boolean

    A document is opening. The viewer paints a spinner instead of the old one.

    isPrintAllowed: boolean

    Whether printing is allowed by the PDF permission flags.

    open: (src: PdfSource) => Promise<void>

    Opens a different document imperatively (file picker, application command, …).

    pageCount: number

    Number of pages, or 0 when nothing is open.

    progress: PdfLoadingProgress | null

    Download progress while opening a URL, or null when unknown/idle.

    sourceName: string | null

    The document's source name (file name or uri%…), or null.