aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/pdf
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2010-06-15 08:55:40 +0000
committerJeremias Maerki <jeremias@apache.org>2010-06-15 08:55:40 +0000
commitb36aeb2cb850c0cf1ae70efaeea3c2e06c32b8a1 (patch)
treeaf2876b8b7906b8a92151cbf71a382869dc677f6 /src/java/org/apache/fop/pdf
parent2150f3f35acbe14ca11c60a948d7a8d8df1b7769 (diff)
downloadxmlgraphics-fop-b36aeb2cb850c0cf1ae70efaeea3c2e06c32b8a1.tar.gz
xmlgraphics-fop-b36aeb2cb850c0cf1ae70efaeea3c2e06c32b8a1.zip
Put the /Resources reference directly into the underlying dictionary and handle null cases since /Resources is optional on a Form XObject.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@954765 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/pdf')
-rw-r--r--src/java/org/apache/fop/pdf/PDFFormXObject.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/pdf/PDFFormXObject.java b/src/java/org/apache/fop/pdf/PDFFormXObject.java
index 5ede9b487..2ccc17086 100644
--- a/src/java/org/apache/fop/pdf/PDFFormXObject.java
+++ b/src/java/org/apache/fop/pdf/PDFFormXObject.java
@@ -34,7 +34,6 @@ import java.io.OutputStream;
public class PDFFormXObject extends PDFXObject {
private PDFStream contents;
- private PDFReference resRef;
/**
* create a FormXObject with the given number and name and load the
@@ -47,13 +46,15 @@ public class PDFFormXObject extends PDFXObject {
public PDFFormXObject(int xnumber, PDFStream contents, PDFReference resources) {
super();
put("Name", new PDFName("Form" + xnumber));
- this.resRef = resources;
this.contents = contents;
put("Type", new PDFName("XObject"));
put("Subtype", new PDFName("Form"));
put("FormType", new Integer(1));
setMatrix(new AffineTransform());
+ if (resources != null) {
+ put("Resources", resources);
+ }
}
/**
@@ -172,7 +173,6 @@ public class PDFFormXObject extends PDFXObject {
if (get("Matrix") == null) {
put("Matrix", new PDFArray(this, new int[] {1, 0, 0, 1, 0, 0}));
}
- put("Resources", resRef);
super.populateStreamDict(lengthEntry);
}