Does anyone know of a “FREE” command line tool that can lock a pdf from a user being able to print it. I need to be able to put this in a batch to loop through a folder and disable printing from adobe standard and reader. Is this possible to do it from command line with any tool?
Share
First,
pdftk:You can use
pdftkfor (available for Linux, Unix, Mac OS X and Windows) to set an "owner password":Result is this, for example:
You can modify the command to additionally require a user password to open the PDF:
You can modify the command to (selectively) "allow" other user actions:
Result may be this, for example:
Second,
podofoencrypt:Commandline example:
Big, fat caveat:
You should be aware, that this way of ‘protecting’ PDF files is by no means super-secure. There are quite a lot of PDF cracker software utilities out there which easily un-protect your PDF files. This method is only a very basic means to prevent most noobie computer users to mess with your files.
In addition, see also
Third,
qpdf:in Martin Schröder’s answer!