You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2014/10/11 00:28:33 UTC

[jira] [Closed] (PDFBOX-96) decrypt encrypt decrypt does not work

     [ https://issues.apache.org/jira/browse/PDFBOX-96?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Hewson closed PDFBOX-96.
-----------------------------
    Resolution: Not a Problem

This issue no longer applies.

> decrypt encrypt decrypt does not work
> -------------------------------------
>
>                 Key: PDFBOX-96
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-96
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Writing
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1305398
> Originally submitted by benlitchfield on 2005-09-26 18:49.
> I've run a simple test.
> Initially loading an already encrypted document, then 
> decrypting etc.
> PDDocument x = PDDocument.load
> ("/home/paul/pdfsin/encrypted.pdf");
> x.decrypt("pass");
>    
> x.save("/home/paul/pdfsout/decrypt1.pdf");
>    
> x.setEncryptionDictionary(new PDStandardEncryption());
> x.encrypt("pass",null);
>    
> x.save("/home/paul/pdfsout/encrypt1.pdf");
>    
> x.decrypt("pass");
> x.save("/home/paul/pdfsout/decrypt2.pdf");
> The net result of this is that the decryption on the pre-
> encrypted works ok,
> the subsequent re-encryption works fine. (checked 
> documents in acrobat, document
> info OK, pages look OK and security settings as 
> expected)
> The final decyption however fails and the 
> resultant "decrypt2.pdf" is all white
> pages. If I modify the above to reload the "encrypt1.pdf" 
> file, do the decrypt
> and save then the final output is fine, so it is just the in 
> memory version
> of the PDF after encryption is non-decryptable, which of 
> course can fairly easily
> be worked around.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)