Skip to content
Advertisement

How to make files not shareable?

I am developing a website with php that is about uploading and selling/buying pdf documents. Of course, I need to program it in a way that makes it impossible (or at least very hard) to copy the purchased documents.

Do you know of any mechanism to do this? Is it a programming issue or rather a pdf issue? Also, are there maybe other file types that you recommend that are better for this purpose than pdf? Maybe there should be another solution than downloading the pdf files but rather only viewing them in a browser?

Thank you! Charles

EDIT

Maybe some more information is needed: The users on the website will upload the pdfs themselves, so there is no way to create the pdfs only when they are downloaded, as they are purely user generated input.

Advertisement

Answer

I believe password/certificate protected pdfs are an option, though iirc they require certificate verification (so Adobe Acrobat loads a certificate and verifies it against your server on each viewing). This can require a lot of faffing by the purchaser, and may put some people off the service.

I’d just generate the pdfs at purchase-time and embed the purchasers details (address, email, etc) visibly inside the pdf (don’t do it just secretly as it would probably violate privacy laws in some countries, though you should embed a private ‘transaction id’), and in it’s metadata. This way it provides both a disincentive to sharing (in that either their details will be shared with others, or that they will have to take the effort to remove them (which is difficult for the average user if you place edit-locks in the file)). It also potentially allows you to identify and block the user from additional purchases if you do find a shared document online.

As per question edit… It’s possible to make automated edits to pdf documents through the use of Ghostscript. (may need integration with something like IMagick or other software depending on the type of edits you wish to apply)

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement