ComPDFKit Web SDK
    Preparing search index...

    Variable defaultConst

    default: {
        init(
            options: Record<string, unknown>,
            element: HTMLElement,
        ): Promise<any>;
        version: string;
        WebViewerError: typeof WebViewerError;
        (
            options: WebViewerOptions,
            element: HTMLElement,
        ): Promise<WebViewerInstance | undefined>;
    }

    Entry of the SDK: call it to create a viewer.

    Type Declaration

      • (
            options: WebViewerOptions,
            element: HTMLElement,
        ): Promise<WebViewerInstance | undefined>
      • Creates a WebViewer inside element. Resolves undefined when the UI is served from another origin (the instance cannot be reached from the host page).

        Parameters

        Returns Promise<WebViewerInstance | undefined>

    • init: function
      • Parameters

        • options: Record<string, unknown>
        • element: HTMLElement

        Returns Promise<any>

        The 2.x entry, kept for existing integrations. Use WebViewer(options, element).

    • Readonlyversion: string

      The WebViewer version.

    • ReadonlyWebViewerError: typeof WebViewerError

      The WebViewerError class, for err instanceof WebViewer.WebViewerError.