Browse Source

FOP-2818: fix color spaces of parent pdf resources member getting lost

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1842844 13f79535-47bb-0310-9956-ffa450edef68
pull/13/head
Matthias Reischenbacher 5 years ago
parent
commit
5f2e374fd2
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java

+ 6
- 1
fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java View File

@@ -298,8 +298,13 @@ public class PDFResources extends PDFDictionary {
put("ExtGState", dict);
}

if (!this.colorSpaces.isEmpty()) {
if (!this.colorSpaces.isEmpty() || (parent != null && !parent.colorSpaces.isEmpty())) {
PDFDictionary dict = new PDFDictionary(this);
if (parent != null) {
for (PDFColorSpace colorSpace : parent.colorSpaces.values()) {
dict.put(colorSpace.getName(), colorSpace);
}
}
for (PDFColorSpace colorSpace : colorSpaces.values()) {
dict.put(colorSpace.getName(), colorSpace);
}

Loading…
Cancel
Save