ComPDFKit Web SDK
    Preparing search index...

    Interface LoadDocumentOptions

    Options for loadDocument.

    interface LoadDocumentOptions {
        customHeaders?: Record<string, string>;
        documentId?: string;
        extension?: string;
        filename?: string;
        l?: string;
        licenseKey?: string;
        onError?: (error: ComPDFKitError) => void;
        onLoadingProgress?: (percent: number) => void;
        password?: string | PasswordCallback;
        signal?: AbortSignal;
        withCredentials?: boolean;
    }
    Index
    customHeaders?: Record<string, string>

    Request headers for URL sources

    documentId?: string

    Business id of the document (Document.getDocumentId(), the argument of setDocumentXFDFRetriever)

    extension?: string

    An explicitly passed non-pdf type is rejected before reading; the format is decided by the file header

    filename?: string

    Takes precedence over the file name inferred from the source

    l?: string

    Shorthand for licenseKey

    licenseKey?: string

    License; the first load with a license triggers initialization, later ones reuse it

    onError?: (error: ComPDFKitError) => void

    On load failure, called back first, then rejects

    onLoadingProgress?: (percent: number) => void

    0–1, (download progress + Worker load progress) / 2, never decreasing; reports 1 exactly once at the end on success

    password?: string | PasswordCallback

    A wrong string reports PASSWORD_REQUIRED; the function form can ask repeatedly

    signal?: AbortSignal

    Aborts the load when signaled.

    withCredentials?: boolean

    Send cookies for cross-origin URL sources