Page 1 of 1

How to Protect the PDF file?

Posted: Wed Mar 28, 2007 1:15 am
by mattarambabu
I have created a PDF file using PHP code. I want to protect restrict the useres from saving the file to the disk ,printing , selecting. i.e users can only read the pdf document.

Any body plz help me, if you have worked on this.
Thanks in advance

Rams

Posted: Wed Mar 28, 2007 1:19 am
by s.dot
Place the PDF above the document root. I'm not sure if this will keep people from saving it.. because i'm not all too familiar with pdfs.

Posted: Wed Mar 28, 2007 2:39 am
by ryuuka
why not just use javascript to disallow people to use the right click function?

http://www.reconn.us/content/view/36/45/

http://www.codebeach.com/tutorials/disa ... script.asp

Re: How to Protect the PDF file?

Posted: Wed Mar 28, 2007 2:56 am
by stereofrog
mattarambabu wrote:I have created a PDF file using PHP code. I want to protect restrict the useres from saving the file to the disk ,printing , selecting. i.e users can only read the pdf document.
You can't. "Read" in technical sense is the same as "save".

Posted: Wed Mar 28, 2007 11:21 am
by pickle
Saving: Absolutely cannot be done. If the user is viewing the PDF, they've already downloaded it (although they may not know it).
Printing: Again, impossible to stop people from printing the contents of a PDF. They can always take screenshots & print those screenshots. Depending on which library you used to create the PDFs, you can set permissions in the PDF which will disallow them from printing the PDF directly from Acrobat. However, if they're using a non-Adobe reader (I don't know if they're very common - but they exist), there's a chance those permissions will be ignored.
Selecting & copying content: Depending on your library, permissions can be set to disallow this. Again though, if they're using a reader that doesn't acknowledge permissions, they can get around that.

Basically, if you're passing information to the users monitor via the web, there is nothing you can do to stop the user from holding on to it permanently.