Invoke direct printing of PDF file from web application at client side
Balaguru Ramaswamy
Greenhorn
Joined: May 23, 2012
Posts: 2
posted
0
Hi All,
I need to print PDF file directly(Without Preview) which is generated in my Java web application. But i am not sure how to do this to perform print from my web browser. So can anybody help me on how to do this.
Help regarding this will be highly appreciated.
Thanks in advance
Bala
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
Print preview is an optional, user-initiated step. But there's no getting around the print dialog wherein the user needs to click OK.
Balaguru Ramaswamy
Greenhorn
Joined: May 23, 2012
Posts: 2
posted
0
Thanks Tim for your reply.
Yes, At least if i can get printer dialog box for user to click ok also fine. But. I didn't find a way of doing this.
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
0
If you can find a way to display the PDF, then you should also be able to call the JavaScript window.print() function from within the PDF.
There's no way to force a user to display a file, though - her browser might be set to store it to disk automatically.