OT: How to send report directly to the printer.. Sorry thought it was obvious but haven't found... please give a clue :-)

2006-01-10 Thread David Gagnon

Hi all,

 I have a web application with a background thread that check for a 
condition and then this condition is meet needs to generates a report 
with fop and send it directly to a  printer. 

For now I want to stay as general as possible.  The web application is 
deployed with Tomcat on Windows or Linux.  I don't know what kind of 
printer (PCL, postscript, etc) either.


Is there a way to have a flexible solution.  I found some info on the 
web site (http://xmlgraphics.apache.org/fop/0.91/output.html) but 
doesn't really apply to my problem.


I also found stuff with JDK1.4 to print .. but no working example.
DocFlavor flavor = DocFlavor.INPUT_STREAM.PCL;
  PrintRequestAttributeSet aset = new 
HashPrintRequestAttributeSet();

  aset.add(MediaSizeName.NA_LETTER);
//aset.add(new PrinterName(107208\\SBE08111, null));
//aset.add(MediaTray.BOTTOM);

Any help, or code example will be appreciated ..
Thanks for your help!
/David

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT: How to send report directly to the printer.. Sorry thought it was obvious but haven't found... please give a clue :-)

2006-01-10 Thread Glen Mazza

David Gagnon wrote:


Hi all,

 I have a web application with a background thread that check for a 
condition and then this condition is meet needs to generates a report 
with fop and send it directly to a  printer.


snip/



Any help, or code example will be appreciated ..


http://www.javaworld.com/javaworld/jw-03-2005/jw-0328-xmlprinting.html?

Glen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]