I am working on an application in which, I display an invoice and onclick of the print button, I need to print the invoice. I was suggest to use window.print(); but I am not sure if that is for printing the web page. I just want the Invoice table on my page to be printed without any other HTML things on the page.
Please suggest on how this is done generally.
If you have an executing JSP script, can't you just stream the report to
a file or to a printing service like lpr? Then let the print subsystem
deal with printing or transmission over a slow link.
If you're asking for an automagic way of doing this, sorry, I don't know.
Hmm, if you print to RTF, then use a (local) JSP or Java app to remove
all the formatting, images, etc., would you have what you want? Just a
thought. Java does have an HTML/XML parser that would be useful reading
an RTF file, I think.
Yes I am thinking of something like that for my periodic reports probably I will save the reports in pdf. If I find that easy, I might as well make it same for all sorts of printings in my application.