You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ma...@apache.org on 2018/10/09 15:53:33 UTC

svn commit: r1843302 - /xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java

Author: matthias
Date: Tue Oct  9 15:53:33 2018
New Revision: 1843302

URL: http://svn.apache.org/viewvc?rev=1843302&view=rev
Log:
FOP-2818: fix color spaces getting lost of pdf images

Modified:
    xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java

Modified: xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java?rev=1843302&r1=1843301&r2=1843302&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java (original)
+++ xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java Tue Oct  9 15:53:33 2018
@@ -299,7 +299,10 @@ public class PDFResources extends PDFDic
         }
 
         if (!this.colorSpaces.isEmpty() || (parent != null && !parent.colorSpaces.isEmpty())) {
-            PDFDictionary dict = new PDFDictionary(this);
+            PDFDictionary dict = (PDFDictionary)this.get("ColorSpace");
+            if (dict == null) {
+                dict = new PDFDictionary(this);
+            }
             if (parent != null) {
                 for (PDFColorSpace colorSpace : parent.colorSpaces.values()) {
                     dict.put(colorSpace.getName(), colorSpace);



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org