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: [email protected]
For additional commands, e-mail: [email protected]