You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2010/06/15 10:55:40 UTC

svn commit: r954765 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFFormXObject.java

Author: jeremias
Date: Tue Jun 15 08:55:40 2010
New Revision: 954765

URL: http://svn.apache.org/viewvc?rev=954765&view=rev
Log:
Put the /Resources reference directly into the underlying dictionary and handle null cases since /Resources is optional on a Form XObject.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFFormXObject.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFFormXObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFFormXObject.java?rev=954765&r1=954764&r2=954765&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFFormXObject.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFFormXObject.java Tue Jun 15 08:55:40 2010
@@ -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 PDFX
     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 PDFX
         if (get("Matrix") == null) {
             put("Matrix", new PDFArray(this, new int[] {1, 0, 0, 1, 0, 0}));
         }
-        put("Resources", resRef);
         super.populateStreamDict(lengthEntry);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org