Package 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 theStandardEncryptionHandler
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 Description PasswordPromptEncryptionHandler(Component parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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, setAES256_GCM, setOwnerPassword, setUserPassword
-
Methods inherited from class org.faceless.pdf2.EncryptionHandler
containsKey, getArrayValueSize, getBooleanValue, getDictionaryValueKeys, getFileId, getIntegerValue, getNameValue, getNumericValue, getStringValue, getTextStringValue, isChanged, markChanged, putArrayValue, putBooleanValue, putDictionaryValue, putNameValue, putNumericValue, putStringValue, putTextStringValue, setFileId
-
-
-
-
Constructor Detail
-
PasswordPromptEncryptionHandler
public PasswordPromptEncryptionHandler(Component parent)
-
-
Method Detail
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classStandardEncryptionHandler
-
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 theEncrypt
dictionary by way of the variousget...
methods, and use them and the value ofEncryptionHandler.getFileId()
to set its internal state so that it's ready to start decryption. It may throw anIOException
if these parameters are invalid, in which case the document cannot be read.- Overrides:
prepareToDecrypt
in classStandardEncryptionHandler
- Throws:
IOException
-
-