pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1557553 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java
Date Sun, 12 Jan 2014 16:26:57 GMT
Author: lehmi
Date: Sun Jan 12 16:26:56 2014
New Revision: 1557553

URL: http://svn.apache.org/r1557553
Log:
PDFBOX-1802: write COSDictionary direct if set to direct

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java?rev=1557553&r1=1557552&r2=1557553&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java Sun Jan 12
16:26:56 2014
@@ -918,8 +918,15 @@ public class COSWriter implements ICOSVi
                 COSBase current = i.next();
                 if( current instanceof COSDictionary )
                 {
-                    addObjectToWrite( current );
-                    writeReference( current );
+                	if (current.isDirect())
+                	{
+                		visitFromDictionary((COSDictionary)current);
+                	}
+                	else
+                	{
+                		addObjectToWrite( current );
+                		writeReference( current );
+                	}
                 }
                 else if( current instanceof COSObject )
                 {



Mime
View raw message