Interface RequestPdfDocumentPasswordCallback
- All Superinterfaces:
AsyncCallback<RequestPdfDocumentPasswordCallback.Params,
,RequestPdfDocumentPasswordCallback.Action> BrowserAsyncCallback<RequestPdfDocumentPasswordCallback.Params,
,RequestPdfDocumentPasswordCallback.Action> BrowserCallback
,Callback
- All Known Implementing Classes:
DefaultRequestPdfDocumentPasswordCallback
,DefaultRequestPdfDocumentPasswordCallback
,DefaultRequestPdfDocumentPasswordCallback
public interface RequestPdfDocumentPasswordCallback
extends BrowserAsyncCallback<RequestPdfDocumentPasswordCallback.Params,RequestPdfDocumentPasswordCallback.Action>
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
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
An action providing a response to theRequestPdfDocumentPasswordCallback
.static interface
The parameters of theRequestPdfDocumentPasswordCallback
. -
Method Summary
Methods inherited from interface com.teamdev.jxbrowser.callback.AsyncCallback
on