Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing the PDF

 
Cherry Cool
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

which API you are using for generating dynamic PDF's ?
 
Cherry Cool
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using IText api
 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64698
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"cherry", please check your private messages for an important administrative matter.
 
Cherry Cool
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for all your response...its working fine now....






Regards
Cherry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic