aspose file tools
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply 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: 2407
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: 2407
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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Invoke direct printing of PDF file from web application at client side
 
Similar Threads
How can I print my pdf file to printer using swt and save the pdf file
display output as pdf
web application + print link
Streaming byte array decoded from base64 to a printer
PDFBox not printing images