Package org.apache.pdfbox.pdmodel.encryption

Examples of org.apache.pdfbox.pdmodel.encryption.PDEncryptionDictionary


     * @throws CryptographyException If there is an error during decryption.
     */
    public void openProtection(DecryptionMaterial pm)
        throws BadSecurityHandlerException, IOException, CryptographyException
    {
        PDEncryptionDictionary dict = this.getEncryptionDictionary();
        if(dict.getFilter() != null)
        {
            securityHandler = SecurityHandlersManager.getInstance().getSecurityHandler(dict.getFilter());
            securityHandler.decryptDocument(this, pm);
            document.dereferenceObjectStreams();
            document.setEncryptionDictionary( null );
        }
        else
View Full Code Here


            isDocLoaded = true;
            log.debug("successfully loaded");
            if (document.isEncrypted()) {
                log.info("document is encrypted. trying to decrypt with empty password.");

                PDEncryptionDictionary dict = document.getEncryptionDictionary();
                if (dict.getRevision() > 4) {
                    log.info("too bad! currently PDFBox does not support this decryption algorithm.");
                    return;
                }

                StandardDecryptionMaterial s = new StandardDecryptionMaterial("");
View Full Code Here

TOP

Related Classes of org.apache.pdfbox.pdmodel.encryption.PDEncryptionDictionary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.