xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r441942 - /xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleFO2OldStylePrint.java
Date Sun, 10 Sep 2006 11:38:03 GMT
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


Mime
View raw message