I have a website where a PDF file can be opened to be viewed in the browser. I’d like to prevent this PDF file is downloaded and also not able to be printed. All users should only be able to view the PDF file.
I’d appreciate any guidance.
I think @Mittineague means that once it’s in their browser being viewed, it’s already on their computer (albeit in a temporary folder) so has already been downloaded. You can set privacy codes when you generate PDF documents that either prevent printing, or require a password to print. I don’t know how you’d do it - I guess it depends on what tool you use to generate the PDF in the first place.
And what if opening the PDF file in another application, able to block print and download?
Or maybe transfer the file to Flash and embed it?
Any solution would be very welcomed.
Thanks a lot.
I guess the question is why do you want the file to be not downloaded [sic saved?] or printed?
The ultimate “protection” you can have is legal protection.
Depending on how important it is to you weighed against how much time and money you’re willing to spend prosecuting violations.
AFAIK a common approach is to limit who can gain access to a file. eg. outside of root and accessed via an expiring session token.
Well to open it in another program it is already downloaded - something you can’t prevent.
Whether that program blocks print or not depends on the program as some PDF programs simply ignore those security settings while others obey them and will only print if the correct print password is entered.
I can only assume you want to display information, but not allow the user to keep or print the information.
Your best method is convert from a pdf into a jpg, and protect the jpg so that it cant be downloaded or printed.
But no method is foolproof, a simple screen shot will defeat this.