xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antti Karanta" <antti.kara...@napa.fi>
Subject Controlling FOP printing
Date Mon, 25 Feb 2008 13:40:36 GMT


               Hi!

   When printing w/ FOP, how do I pop up a printing dialog to allow the  
user to select the printer to print to? Now the print seems to go to the  
default printer, no questions asked.

   I found this related bug report:  
http://issues.apache.org/bugzilla/show_bug.cgi?id=31674
   It's 3.5 years old and nothing has happened to it for ages.


   Going through FOP sources, I found this in  
org.apache.fop.render.print.PrintRenderer:

89        if (System.getProperty("dialog") != null) {
90            if (!printerJob.printDialog()) {

   It seems a little exotic to set system properties to parameterize the  
printing workflow. Is this the only way?


   What I (think I) need to do is:

   - have the user select a printer
   - query the created print job object (or whatever it is, I'm not (yet)  
very familiar w/ java printing API) for the page size
   - use the page size as a parameter for xsl transformation producing the  
fo (docbook xsl stylesheets)
   - have fop render the given fo to the given printer


   Any hints, tips, sample code etc. are very welcome!



       .::Antti::.



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


Mime
View raw message