When you need to distribute documents in PDF format, you’ll probably want to protect them. If you are working on Mac OS X (or Windows) and you have Adobe Acrobat, that can be done quite easily.
But if you’re running Linux on your desktop —or even if you’re using Windows or a Mac and don’t want to use proprietary programs—, there are free tools that will let you protect your files by adding encryption, passwords and restrictions.
One of those tools is pdftk (the pdf toolkit). On Debian and Ubuntu, pdftk is already present in the official repositories, so all you have to do to install it is:
apt-get install pdftk
In the product’s website you’ll also find binary packages for FreeBSD, Mac OS X and Windows.
Here are some examples that show you how to use the program:
- Encrypt a PDF using 128-Bit Strength (the default) and withhold all permissions:
pdftk mydoc.pdf output mydoc.128.pdf owner_pw foopass - Same as above, except that a password is required to open the PDF:
pdftk mydoc.pdf output mydoc.128.pdf owner_pw foo user_pw baz - Same as above, except that printing is allowed (after the PDF has been opened):
pdftk mydoc.pdf output mydoc.128.pdf owner_pw foo user_pw baz allow printing
Besides the security functions, pdftk has many more features that you might find useful too, including the ability to merge, split and rotate PDF documents, or applying watermarks.


