How to achieve batch printing of html/jsp page without showing it to user.
I have a html page in browser showing order no and a checkbox corresponding to each order no. Use select a few order nos. and press print button on this html page. Details of all user selected orders should be printed on a printer without user seeing any order details or default print dialogue option.
Please suggest.
-
Batch Printing html/jsp pages (2 messages)
- Posted by: Gopal Sharma
- Posted on: December 22 2003 08:06 EST
Threaded Messages (2)
- Batch Printing html/jsp pages by Paul Strack on December 22 2003 08:54 EST
- Re: Batch Printing html/jsp pages by Sachin Joshi on August 18 2008 15:55 EDT
-
Batch Printing html/jsp pages[ Go to top ]
- Posted by: Paul Strack
- Posted on: December 22 2003 08:54 EST
- in response to Gopal Sharma
This should not be possible. If there was a way to do this, it would be a bug in the security features of the browser. The same operation would allow a viral program to hijack the user's printer to print anything.
I suggest you create a server-side process that assembles all the selected orders in a new page, with a "print" button on that page. You can use CSS to put in page breaks at the appropriate location. -
Re: Batch Printing html/jsp pages[ Go to top ]
- Posted by: Sachin Joshi
- Posted on: August 18 2008 15:55 EDT
- in response to Paul Strack
The Browser need to support such a functionality. Its nothing to do with JSP. Current browser will always prompt user for printing, which is a safe thing to do because if you can do it in batch then it would be a security loop hole.... Alternative way of doing it would be creating a single document for all that you want to print and then ask the user only once to print it all. Otherwise you may need to write an Applet or ActiveX code for it.