pdfrx_web
    Preparing search index...

    Interface PdfAnnotationsState

    Annotation state returned by useAnnotations.

    interface PdfAnnotationsState {
        add: (
            pageNumber: number,
            spec: PdfAnnotationSpec,
        ) => Promise<string | undefined>;
        annotations: readonly PdfAnnotationObject[];
        isLoading: boolean;
        reload: () => void;
        remove: (pageNumber: number, id: string) => Promise<void>;
        update: (
            pageNumber: number,
            id: string,
            spec: PdfAnnotationSpec,
        ) => Promise<string | undefined>;
    }
    Index
    add: (
        pageNumber: number,
        spec: PdfAnnotationSpec,
    ) => Promise<string | undefined>

    Creates an annotation on pageNumber (1-based); resolves to its id.

    annotations: readonly PdfAnnotationObject[]

    All content annotations of the document, [] when there are none.

    isLoading: boolean

    Whether the annotations are being loaded.

    reload: () => void

    Forces a reload of the annotation list.

    remove: (pageNumber: number, id: string) => Promise<void>

    Removes the annotation id from pageNumber.

    update: (
        pageNumber: number,
        id: string,
        spec: PdfAnnotationSpec,
    ) => Promise<string | undefined>

    Replaces the annotation id with a fresh one built from spec.