pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1631232 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java
Date Sun, 12 Oct 2014 17:48:16 GMT
Author: lehmi
Date: Sun Oct 12 17:48:15 2014
New Revision: 1631232

URL: http://svn.apache.org/r1631232
Log:
PDFBOX-2351: don't keep the XRefStm value when saving a file without creating a XRef-stream

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java?rev=1631232&r1=1631231&r2=1631232&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java Sun
Oct 12 17:48:15 2014
@@ -578,6 +578,10 @@ public class COSWriter implements ICOSVi
         {
           trailer.removeItem( COSName.PREV );
         }
+        if (!doc.isXRefStream())
+        {
+            trailer.removeItem( COSName.XREF_STM );
+        }
         // Remove a checksum if present
         trailer.removeItem( COSName.DOC_CHECKSUM );
         



Mime
View raw message