aspose file tools*
The moose likes Other Open Source Projects and the fly likes Disable PDF access permissions like Save/Save As/Print Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Disable PDF access permissions like Save/Save As/Print" Watch "Disable PDF access permissions like Save/Save As/Print" New topic
Author

Disable PDF access permissions like Save/Save As/Print

tushar borole
Greenhorn

Joined: Oct 13, 2008
Posts: 12
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
Marshal

Joined: Mar 22, 2005
Posts: 41508
    
  53
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.


Ping & DNS - my free Android networking tools app
tushar borole
Greenhorn

Joined: Oct 13, 2008
Posts: 12
Thank you. Could you please let me know where I can get the required jar to download?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41508
    
  53
What did you get when you googled "download itext"?
Sarah Wang
Greenhorn

Joined: Dec 23, 2010
Posts: 2
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!


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disable PDF access permissions like Save/Save As/Print