summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Reischenbacher <matthias@apache.org>2018-10-09 15:53:33 +0000
committerMatthias Reischenbacher <matthias@apache.org>2018-10-09 15:53:33 +0000
commitc88ef282f60e6ef566d274a52bf0bc3779be90a5 (patch)
treeb7a10978673bf8ffda022cb395e1ba82a462c4ce
parent54c5070a0e728c48874e3d9a394098b341e8f5d3 (diff)
downloadxmlgraphics-fop-c88ef282f60e6ef566d274a52bf0bc3779be90a5.tar.gz
xmlgraphics-fop-c88ef282f60e6ef566d274a52bf0bc3779be90a5.zip
FOP-2818: fix color spaces getting lost of pdf images
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1843302 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java
index e269ad361..af2c27d9f 100644
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java
@@ -299,7 +299,10 @@ public class PDFResources extends PDFDictionary {
}
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);