COSObject trailerEncryptObj = (COSObject) trailerEncryptItem;
parseObjectDynamically(trailerEncryptObj, true);
}
try
{
PDEncryptionDictionary encParameters = new PDEncryptionDictionary(document.getEncryptionDictionary());
DecryptionMaterial decryptionMaterial = null;
if (keyStoreFilename != null)
{
KeyStore ks = KeyStore.getInstance("PKCS12");
ks.load(new FileInputStream(keyStoreFilename), password.toCharArray());
decryptionMaterial = new PublicKeyDecryptionMaterial(ks, alias, password);
}
else
{
decryptionMaterial = new StandardDecryptionMaterial(password);
}
securityHandler = SecurityHandlersManager.getInstance().getSecurityHandler(encParameters.getFilter());
securityHandler.prepareForDecryption(encParameters, document.getDocumentID(), decryptionMaterial);
AccessPermission permission = securityHandler.getCurrentAccessPermission();
if (!permission.canExtractContent())
{