pdfrx_web
    Preparing search index...

    Interface PdfDocumentEventMap

    Payload types of the events emitted by PdfDocument, keyed by event name. Subscribe with PdfDocument.addEventListener.

    interface PdfDocumentEventMap {
        annotationsChanged: {
            actorId?: string;
            changes: readonly PdfAnnotationChange[];
            historyChanges: readonly PdfAnnotationHistoryChange[];
            origin: PdfAnnotationChangeOrigin;
            pageNumbers: number[];
            transactionId?: string;
        };
        formFieldsChanged: {
            actorId?: string;
            changes: readonly PdfFormFieldChange[];
            origin: PdfFormChangeOrigin;
            pageNumbers?: number[];
            source: "user"
            | "api";
            transactionId?: string;
        };
        linksChanged: { pageNumbers: number[] };
        loadComplete: Record<string, never>;
        missingFonts: { queries: PdfFontQuery[] };
        outlineChanged: Record<string, never>;
        pagesRearranged: {
            actorId?: string;
            after: readonly PdfPageArrangementEntry[];
            before: readonly PdfPageArrangementEntry[];
            origin: PdfPageChangeOrigin;
            pageNumbers: number[];
            transactionId?: string;
        };
        pageStatusChanged: { pageNumbers: number[] };
    }
    Index
    annotationsChanged: {
        actorId?: string;
        changes: readonly PdfAnnotationChange[];
        historyChanges: readonly PdfAnnotationHistoryChange[];
        origin: PdfAnnotationChangeOrigin;
        pageNumbers: number[];
        transactionId?: string;
    }

    Annotations were added, updated or removed. The exact synchronization-ready changes are included. origin: 'remote' identifies changes that should not be published back to the same synchronization channel. Page-scoped CRUD is reported by the source document and by every open arrangement that places that physical page; duplicate placements contribute each affected arrangement page number.

    Type Declaration

    formFieldsChanged: {
        actorId?: string;
        changes: readonly PdfFormFieldChange[];
        origin: PdfFormChangeOrigin;
        pageNumbers?: number[];
        source: "user" | "api";
        transactionId?: string;
    }

    One form transaction completed. changes contains the complete typed before/after diff, including calculated fields changed as a consequence. source is 'user' for interactive edits in the viewer (relayed from the form-fill module) and 'api' for programmatic writes.

    Type Declaration

    • OptionalactorId?: string
    • changes: readonly PdfFormFieldChange[]

      Every direct and calculated field change produced by one transaction.

    • origin: PdfFormChangeOrigin
    • OptionalpageNumbers?: number[]
    • source: "user" | "api"

      Kept for UI consumers distinguishing interactive and programmatic writes.

    • OptionaltransactionId?: string
    linksChanged: { pageNumbers: number[] }

    Logical Link-annotation replacements were staged on the listed arranged pages.

    loadComplete: Record<string, never>

    All pages are loaded (fired immediately for non-progressive loading).

    missingFonts: { queries: PdfFontQuery[] }

    The engine reported missing fonts; supply them via PdfrxEngine.addFontData.

    outlineChanged: Record<string, never>

    The logical document outline was replaced through PdfDocument.setOutline().

    pagesRearranged: {
        actorId?: string;
        after: readonly PdfPageArrangementEntry[];
        before: readonly PdfPageArrangementEntry[];
        origin: PdfPageChangeOrigin;
        pageNumbers: number[];
        transactionId?: string;
    }

    The arrangement of pages changed — order, rotation, or count — via PdfDocument.setPages or PdfDocument.materialize. Always accompanied by pageStatusChanged; listen to this one to invalidate things keyed by page position, which a plain progressive-load update does not disturb.

    Type Declaration

    pageStatusChanged: { pageNumbers: number[] }

    Page objects were replaced (progressive load / reload).