wood burning stoves 2.0*
The moose likes Java in General and the fly likes Invoke direct printing of PDF file from web application at client side Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Invoke direct printing of PDF file from web application at client side" Watch "Invoke direct printing of PDF file from web application at client side" New topic
Author

Invoke direct printing of PDF file from web application at client side

Balaguru Ramaswamy
Greenhorn

Joined: May 23, 2012
Posts: 2
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: 2408
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
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: 2408
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.
 
wood burning stoves
 
subject: Invoke direct printing of PDF file from web application at client side
 
Similar Threads
PDFBox not printing images
How can I print my pdf file to printer using swt and save the pdf file
web application + print link
Streaming byte array decoded from base64 to a printer
display output as pdf