org.faceless.pdf2.viewer2
Class PasswordPromptEncryptionHandler

java.lang.Object
  extended by org.faceless.pdf2.EncryptionHandler
      extended by org.faceless.pdf2.StandardEncryptionHandler
          extended by 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
PasswordPromptEncryptionHandler(Component parent)
           
 
Method Summary
 void prepareToDecrypt()
          This method is called just before the PDF is read in.
 
Methods inherited from class org.faceless.pdf2.StandardEncryptionHandler
clone, equals, 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

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-2013 Big Faceless Organization