You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Nathan Lusher <nl...@yahoo.com> on 2004/08/27 14:17:47 UTC

Printing in 0.20.5?

Im trying to print an fo document and Ive seen the
following example in a lot of places including
FopPrintServlet example that is distributed with the
release.

...
Driver driver = new Driver(foFile, null);
PrinterJob pj = PrinterJob.getPrinterJob();
PrintRenderer renderer = new PrintRenderer(pj);

driver.setLogger (log);
driver.setRenderer(renderer);
driver.run();
...

However, PrintRenderer (at least in 0.20.5) is
abstract, and none of its implementing subclasses
appear to take a PrinterJob as an argument to their
constructor.

Anyone know what Im doing wrong?

-N

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


Re: Printing in 0.20.5?

Posted by Jeremias Maerki <de...@greenmail.ch>.
Well, it's not org.apache.fop.render.PrintRenderer you need to look up.
PrintRenderer in this case is an inner class of the FopPrintServlet
class (or org.apache.fop.render.PrintStarter). This inner class is a
subclass of org.apache.fop.render.awt.AWTRenderer. But the AWTRenderer
should already work for you. HTH

On 27.08.2004 14:17:47 Nathan Lusher wrote:
> Im trying to print an fo document and Ive seen the
> following example in a lot of places including
> FopPrintServlet example that is distributed with the
> release.
> 
> ...
> Driver driver = new Driver(foFile, null);
> PrinterJob pj = PrinterJob.getPrinterJob();
> PrintRenderer renderer = new PrintRenderer(pj);
> 
> driver.setLogger (log);
> driver.setRenderer(renderer);
> driver.run();
> ...
> 
> However, PrintRenderer (at least in 0.20.5) is
> abstract, and none of its implementing subclasses
> appear to take a PrinterJob as an argument to their
> constructor.
> 
> Anyone know what Im doing wrong?


Jeremias Maerki


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