Class RequestPdfDocumentPasswordCallback.Action

java.lang.Object
com.teamdev.jxbrowser.callback.AsyncCallbackAction<com.teamdev.jxbrowser.plugin.internal.rpc.RequestPdfDocumentPassword.Response>
com.teamdev.jxbrowser.browser.callback.RequestPdfDocumentPasswordCallback.Action
Enclosing interface:
RequestPdfDocumentPasswordCallback

public static final class RequestPdfDocumentPasswordCallback.Action extends AsyncCallbackAction<com.teamdev.jxbrowser.plugin.internal.rpc.RequestPdfDocumentPassword.Response>
An action providing a response to the RequestPdfDocumentPasswordCallback.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Action(Consumer<com.teamdev.jxbrowser.plugin.internal.rpc.RequestPdfDocumentPassword.Response> consumer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancels the password request.
    void
    password(String password)
    Tells the browser to use the password to load the encrypted PDF document.
    void
    Tells the browser to use the standard PDF viewer password dialog UI to load the encrypted PDF document.

    Methods inherited from class com.teamdev.jxbrowser.callback.AsyncCallbackAction

    isClosed

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Action

      public Action(Consumer<com.teamdev.jxbrowser.plugin.internal.rpc.RequestPdfDocumentPassword.Response> consumer)
  • Method Details

    • password

      public void password(String password)
      Tells the browser to use the 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.

      Parameters:
      password - the password for the encrypted PDF document
    • showPasswordDialog

      public void showPasswordDialog()
      Tells the browser to use the standard PDF viewer password dialog UI to load the encrypted PDF document.
    • cancel

      public void cancel()
      Cancels the password request.

      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.