OptionalcustomHeaders?: Record<string, string>Request headers for URL sources
OptionaldocumentId?: stringBusiness id of the document (Document.getDocumentId(), the argument of setDocumentXFDFRetriever)
Optionalextension?: stringAn explicitly passed non-pdf type is rejected before reading; the format is decided by the file header
Optionalfilename?: stringTakes precedence over the file name inferred from the source
OptionalonError?: (error: ComPDFKitError) => voidOn load failure, called back first, then rejects
OptionalonLoadingProgress?: (percent: number) => void0–1, (download progress + Worker load progress) / 2, never decreasing; reports 1 exactly once at the end on success
Optionalpassword?: string | ((checkPassword: (password: string) => void) => void)A wrong string reports PASSWORD_REQUIRED; the function form can ask repeatedly
Optionalsignal?: AbortSignalAborts the load when signaled.
OptionalwithCredentials?: booleanSend cookies for cross-origin URL sources
OptionaldocId?: stringAnother name for documentId; used when documentId is not given.
Options of UI.loadDocument: the core document loading options, without the license key (the viewer's license is used).