• 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

Disable PDF access permissions like Save/Save As/Print

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to disable save/save as/print permissions for the pdf file which I am displaying in IE/any browser. I want to change these options dynamically at runtime.Can anyon suggest me how to acheive this functionality in java. (Is java Applet would be a good options for it. If yes how to do this). Thanks in advance.

Tushar Borole
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Yes, this can be done with Java, but an applet is not the right place to do it, and it needs to be done before the PDF is served to the client.

The excellent iText library can apply security to an existing PDF. My post in this thread shows a relevant code excerpt that uses iText.

I'll move this post to the Other Open Source project forum where iText is discussed.
 
tushar borole
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you. Could you please let me know where I can get the required jar to download?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What did you get when you googled "download itext"?
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I know how to disable permissions for the pdf existed in the local hard drive, but I use the same method to output the pdf in IE, and there is only a blank page with no exception. If any one know what's the problem? If there is any comments, I appreciate it. Thanks a lot!


 
reply
    Bookmark Topic Watch Topic
  • New Topic