PDF Web Viewer
    Preparing search index...

    Type Alias IPasswordRequiredCallback

    IPasswordRequiredCallback: (error: IPasswordRequiredError) => Promise<string>

    Callback triggered when the current PDF cannot be opened/decrypted without a password.

    Use it to override the default library password prompt and implement your own UX: show a modal, request password from a secure source, etc.

    The library will wait for the returned Promise to resolve.

    Type declaration

      • (error: IPasswordRequiredError): Promise<string>
      • Parameters

        • error: IPasswordRequiredError

          Details about the password request (e.g., wrong password, password required).

        Returns Promise<string>

        Promise that resolves with the password string. Reject to indicate cancellation.