Interface RequestPdfDocumentPasswordCallback

All Superinterfaces:
AsyncCallback<RequestPdfDocumentPasswordCallback.Params,RequestPdfDocumentPasswordCallback.Action>, BrowserAsyncCallback<RequestPdfDocumentPasswordCallback.Params,RequestPdfDocumentPasswordCallback.Action>, BrowserCallback, Callback
All Known Implementing Classes:
DefaultRequestPdfDocumentPasswordCallback, DefaultRequestPdfDocumentPasswordCallback, DefaultRequestPdfDocumentPasswordCallback

The callback is invoked when the frame requests the password for an encrypted PDF document.

Use the RequestPdfDocumentPasswordCallback.Action.password(String) to provide the password for the encrypted PDF document.

Use the RequestPdfDocumentPasswordCallback.Action.showPasswordDialog() method to invoke the default PDF viewer password dialog.

Use the RequestPdfDocumentPasswordCallback.Action.cancel() method to cancel the request.


 browser.set(RequestPdfDocumentPasswordCallback.class, (params, tell) -> {
     if (params.url().endsWith("my-protected-file.pdf")) {
         tell.password("H3NXrfF23");
     }
 });
 
Since:
7.27