pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1735641 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXRefStream.java
Date Fri, 18 Mar 2016 16:54:06 GMT
Author: tilman
Date: Fri Mar 18 16:54:06 2016
New Revision: 1735641

URL: http://svn.apache.org/viewvc?rev=1735641&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/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXRefStream.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXRefStream.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXRefStream.java?rev=1735641&r1=1735640&r2=1735641&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXRefStream.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXRefStream.java
Fri Mar 18 16:54:06 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