This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disable PDF access permissions like Save/Save As/Print

 
tushar borole
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • 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
  • 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: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What did you get when you googled "download itext"?
 
Sarah Wang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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!


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic