wood burning stoves 2.0*
The moose likes JSP and the fly likes Printing the PDF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Printing the PDF" Watch "Printing the PDF" New topic
Author

Printing the PDF

Cherry Cool
Greenhorn

Joined: Apr 17, 2008
Posts: 3
Hi,
I had a requirement where i need to print the pdf which will generate dynamically.I was able to generate the pdf dynamically depending on user interaction.I was stuck up with some problem on how to give the print functionality to that pdf when uder clicks on print button i n a jsp.Please help me on this task.








Regards,
Tulasi Rao
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi,

which API you are using for generating dynamic PDF's ?


Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
Cherry Cool
Greenhorn

Joined: Apr 17, 2008
Posts: 3
Hi,
I am using IText api
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi Cherry,

In order to print a PDF document the adobe needs to open the PDF. as far as I know you cannot print PDF document without opening. I have found that some versions of Adobe plugins stay open even after printing so I added additional JavaScript to close the document after printing.

Below is code sample that includes closing the document after printing. so virtually to users it appears as if the document never opened.



hope this helps
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41117
    
  45
An important point to realize is that the web app (and the PDF) have no control over whether the user opens it, saves it or prints it. There's nothing the web app developer can do to make the document print on the client side, if the user chooses not to do that.


Ping & DNS - my free Android networking tools app
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

"cherry", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Cherry Cool
Greenhorn

Joined: Apr 17, 2008
Posts: 3
Hi,
Thanks for all your response...its working fine now....






Regards
Cherry
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Printing the PDF
 
Similar Threads
generate barcode image
Is any way We can tell JSF to not response
printing a form
Can I make a PDF file using Java?
Java Print Service question