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 2006/09/10 13:38:03 UTC

svn commit: r441942 - /xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleFO2OldStylePrint.java

Author: jeremias
Date: Sun Sep 10 04:38:03 2006
New Revision: 441942

URL: http://svn.apache.org/viewvc?view=rev&rev=441942
Log:
Fix a bug in the example code: Without setting the user agent on the Renderer instance, stuff like using images doesn't work.

Modified:
    xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleFO2OldStylePrint.java

Modified: xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleFO2OldStylePrint.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleFO2OldStylePrint.java?view=diff&rev=441942&r1=441941&r2=441942
==============================================================================
--- xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleFO2OldStylePrint.java (original)
+++ xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleFO2OldStylePrint.java Sun Sep 10 04:38:03 2006
@@ -60,11 +60,14 @@
         PrinterJob printerJob = PrinterJob.getPrinterJob();
         printerJob.setJobName("FOP Printing Example");
 
-        PrintRenderer renderer = new PrintRenderer(printerJob);
-        
         try {
             //Set up a custom user agent so we can supply our own renderer instance
             FOUserAgent userAgent = fopFactory.newFOUserAgent();
+
+            //Set up our own PrintRenderer instance so we can supply a special PrinterJob instance.
+            PrintRenderer renderer = new PrintRenderer(printerJob);
+            renderer.setUserAgent(userAgent);
+            
             userAgent.setRendererOverride(renderer);
             
             // Construct fop with desired output format (here, it is set through the user agent)



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