You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2014/08/27 22:50:13 UTC
svn commit: r1620977 -
/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
Author: tilman
Date: Wed Aug 27 20:50:12 2014
New Revision: 1620977
URL: http://svn.apache.org/r1620977
Log:
PDFBOX-2292: build document catalog after decrypting document to prevent exception in save; remove a call that was already done before
Modified:
pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1620977&r1=1620976&r2=1620977&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Wed Aug 27 20:50:12 2014
@@ -940,7 +940,6 @@ public class PDDocument implements Pagea
{
StandardDecryptionMaterial m = new StandardDecryptionMaterial(password);
this.openProtection(m);
- document.dereferenceObjectStreams();
}
catch(BadSecurityHandlerException e)
{
@@ -1596,6 +1595,7 @@ public class PDDocument implements Pagea
securityHandler.decryptDocument(this, pm);
document.dereferenceObjectStreams();
document.setEncryptionDictionary( null );
+ getDocumentCatalog();
}
else
{