[
https://issues.apache.org/jira/browse/PDFBOX-2447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ralf Hauser updated PDFBOX-2447:
--------------------------------
Attachment: patch2447.txt
it turns out that if I do an unmotivated
PDDocumentCatalog cat = document.getDocumentCatalog();
before the save(), it doesn't happen.
Apparently, the
PDDocument.documentCatalog
is no longer initialized...
> "Cannot save a document which has been closed" when encrypting
> --------------------------------------------------------------
>
> Key: PDFBOX-2447
> URL: https://issues.apache.org/jira/browse/PDFBOX-2447
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 2.0.0
> Environment: java7 deb7
> Reporter: Ralf Hauser
> Attachments: patch2447.txt
>
>
> InputStream content = ...;
> int keyLength = 256;
> AccessPermission ap = new AccessPermission();
> StandardProtectionPolicy spp = new
> StandardProtectionPolicy(
> symmPw, symmPw, ap);
> spp.setEncryptionKeyLength(keyLength);
> document.protect(spp);
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> document.save(baos);
> in the save() the above mentioned exception is thrown (wasn't with the
> 2013-11 snapshot)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)