Reputation: 23
I have a client who wants to provide a PDF document on their website but they want to ensure that the document is protected from being downloaded. I've looked at some js plugins that provide readers, but it seems like a quick look at the source code will reveal the path to the PDF in most cases. Anyone have experience with this or know how it can be done?
Upvotes: 1
Views: 1805
Reputation: 3615
The "normal" approach is to not bother about not allowing to download, but to make the documents usable only under certain conditions. This essentially means some kind of DRM (Digital Rights Management) system.
You can for example have the document call home and ask for permission to be opened, or printed. You can also tie the file to the user's hard disk (via signature), etc.
With document security, you (your client) has to decide how much it is worth to you/him. That will also set the budget for a DRM system.
Upvotes: 1
Reputation: 6214
If you want to allow people to view the documents but make it hard for them to copy them, you'll need to do the document rendering server-side. Keep track of the user's viewport (size, zoom, coordinates in the document, etc.), render the portion of the document within the viewport as a static image, and send that to the user. Keep in mind that no matter what you do, users can reassemble the document if they put enough effort into it.
Upvotes: 2