• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Printing the PDF

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using IText api
 
ujjwal soni
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks for all your response...its working fine now....






Regards
Cherry
reply
    Bookmark Topic Watch Topic
  • New Topic