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.
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.
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.