org.faceless.pdf2.viewer2

## Class PasswordPromptEncryptionHandler

- java.lang.Object
- - org.faceless.pdf2.EncryptionHandler
  - - org.faceless.pdf2.StandardEncryptionHandler
    - - org.faceless.pdf2.viewer2.PasswordPromptEncryptionHandler

- All Implemented Interfaces:
    Cloneable

      public class PasswordPromptEncryptionHandler
      extends StandardEncryptionHandler

  An extension of the `StandardEncryptionHandler` that will pop up a password dialog to request the password if necessary.

  This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.

  Since:
    2.8

- - ### Field Summary

    - ### Fields inherited from class org.faceless.pdf2.StandardEncryptionHandler

      `CHANGE_ALL, CHANGE_ANNOTATIONS, CHANGE_FORMS, CHANGE_LAYOUT, CHANGE_NONE, EXTRACT_ACCESSIBILITY, EXTRACT_ALL, EXTRACT_NONE, PRINT_HIGHRES, PRINT_LOWRES, PRINT_NONE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PasswordPromptEncryptionHandler(Component parent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `void` | `prepareToDecrypt()` This method is called just before the PDF is read in.

    - ### Methods inherited from class org.faceless.pdf2.StandardEncryptionHandler

      `clone, finishedDecrypt, finishedEncrypt, getChange, getDecryptedStreamLength, getDecryptionStream, getDescription, getEncryptedStreamLength, getEncryptionStream, getExtract, getFilterName, getPrint, getSubFilterName, getVersion, hashCode, hasRight, isEmbeddedFileEncrypted, isMetadataEncrypted, isOwnerPasswordKnown, isRequired, isStreamEncrypted, isStringEncrypted, prepareToEncrypt, setAcrobat3Level, setAcrobat5Level, setAcrobat6Level, setAcrobat7Level, setAcrobat9Level, setAcrobatXLevel, setOwnerPassword, setUserPassword`

    - ### Methods inherited from class org.faceless.pdf2.EncryptionHandler

      `containsKey, getArrayValueSize, getBooleanValue, getDictionaryValueKeys, getFileId, getNameValue, getNumericValue, getStringValue, getTextStringValue, markChanged, putArrayValue, putBooleanValue, putDictionaryValue, putNameValue, putNumericValue, putStringValue, putTextStringValue, setFileId`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PasswordPromptEncryptionHandler

          public PasswordPromptEncryptionHandler(Component parent)

  - ### Method Detail

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `StandardEncryptionHandler`

    - #### prepareToDecrypt

          public void prepareToDecrypt()
                                throws IOException

      Description copied from class: `EncryptionHandler`
      This method is called just before the PDF is read in. It is expected that this method will read various parameters from the `Encrypt` dictionary by way of the various `get...` methods, and use them and the value of `EncryptionHandler.getFileId()` to set its internal state so that it's ready to start decryption. It may throw an `IOException` if these parameters are invalid, in which case the document cannot be read.
      Overrides:
        `prepareToDecrypt` in class `StandardEncryptionHandler`
      Throws:
        `IOException`

Copyright © 2001-2015 Big Faceless Organization