Here are the basics:
        PDDocument doc = null;
        try {
            doc = PDDocument.load(someFile);
            StandardDecryptionMaterial sdm = new 
StandardDecryptionMaterial("yourPasswordGoesHere");
            doc.openProtection(sdm);
            // use the document like normal
        } catch(...) {
            // decryption error
        } finally {
            if(doc != null)
                doc.close();
        }




"Hesham G." <heshamgne...@gmail.com> 
10/30/2009 04:37
Please respond to
pdfbox-users@incubator.apache.org


To
<pdfbox-users@incubator.apache.org>
cc

Subject
Re: PDF Permissions






I am having problems with encrypted PDFs too. I don't know but I think 
there 
are things wrong with the Encryption / Decryption classes.

Best regards ,
Hesham
 



?  Click here to submit conditions  

This email and any content within or attached hereto from  Sun West Mortgage 
Company, Inc.  is confidential and/or legally privileged. The information is 
intended only for the use of the individual or entity named on this email. If 
you are not the intended recipient, you are hereby notified that any 
disclosure, copying, distribution or the taking of any action in reliance on 
the contents of this email information is strictly prohibited, and that the 
documents should be returned to this office immediately by email. Receipt by 
anyone other than the intended recipient is not a waiver of any privilege. 
Please do not include your social security number, account number, or any other 
personal or financial information in the content of the email. Should you have 
any questions, please call  (800) 453 7884.   

Reply via email to