public static final class RequestPdfDocumentPasswordCallback.Action extends AsyncCallbackAction<com.teamdev.jxbrowser.plugin.internal.rpc.RequestPdfDocumentPassword.Response>
RequestPdfDocumentPasswordCallback
.Constructor and Description |
---|
Action(java.util.function.Consumer<com.teamdev.jxbrowser.plugin.internal.rpc.RequestPdfDocumentPassword.Response> consumer) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the password request.
|
void |
password(java.lang.String password)
Tells the browser to use the
password to load the encrypted PDF document. |
void |
showPasswordDialog()
Tells the browser to use the standard PDF viewer password dialog UI to load the
encrypted PDF document.
|
isClosed
public Action(java.util.function.Consumer<com.teamdev.jxbrowser.plugin.internal.rpc.RequestPdfDocumentPassword.Response> consumer)
public void password(java.lang.String password)
password
to load the encrypted PDF document.
If the provided password is incorrect, the browser will fail to load the frame with the PDF document.
password
- the password for the encrypted PDF documentpublic void showPasswordDialog()
public void cancel()
Without a password, the browser will fail to load the frame with the encrypted
PDF document and a FrameLoadFailed
event will be fired for that frame.