pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1620977 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
Date Wed, 27 Aug 2014 20:50:13 GMT
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
         {



Mime
View raw message