pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1735640 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXRefStream.java
Date Fri, 18 Mar 2016 16:53:23 GMT
Author: tilman
Date: Fri Mar 18 16:53:23 2016
New Revision: 1735640

URL: http://svn.apache.org/viewvc?rev=1735640&view=rev
Log:
PDFBOX-3276: /Encrypt dictionary has already been written, so don't make it direct and write
it a second time

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXRefStream.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXRefStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXRefStream.java?rev=1735640&r1=1735639&r2=1735640&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXRefStream.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXRefStream.java Fri Mar
18 16:53:23 2016
@@ -111,6 +111,11 @@ public class PDFXRefStream implements PD
             {
                 continue;
             }
+            // this one too, because it has already been written in COSWriter.doWriteBody()
+            if (COSName.ENCRYPT.equals(cosName))
+            {
+                continue;
+            }
             COSBase dictionaryObject = this.stream.getDictionaryObject(cosName);
             dictionaryObject.setDirect(true);
         }



Mime
View raw message