'protect from copying or modifying pdf file with python

Looking for a solution to protect a pdf from a viewer to copy from it or modify it's content.

I'm not referring to password protection.

We are using ReportLab to drawImage and drawString, however it seems that the data we are drawing can be copied to clipboard from a standard pdf viewer.

How can I prevent that? Have checked PDFtk already and this is not an option, since there's a compatibility issue with Centos7 (..that i run), moreover, I prefer a pure python if possible



Solution 1:[1]

This is a very late reply, but the solution you are looking for is a format called PDF/A.

There is several option underneath, so it is worth reading into it. This literally flattens your PDF and modifies it with additional fields, protecting a user to "copy+paste" the information directly. It anyhow does not protect the document of being send somewhere or screenshots etc..

Ghostscript is supporting this, as one of many.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 David