diff options
-rw-r--r-- | fop-core/src/main/java/org/apache/fop/pdf/PDFResources.java | 7 |
1 files changed, 6 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 96d45a13a..e269ad361 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 @@ -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); } |