Sunday, January 12, 2025

pdftk - some usefulness

Some people like to receive PDF's encrypted, so I had to find a way to do it. I think it's stupid, since it can be cracked anyway, but whatever. It's a PITA. pdftk has some options that helped. Out of the box, Evince stalled attempting to open pdftk encrypted files, whereas an Adobe Acrobat encrypted file would not.

works

The simplest usage seems to do the best. Basically an input, output (if I want to rename), and a password. Opens in Evince and on receivers' Adobe Acrobat.

# pacman -S pdftk
$ pdftk somefile.pdf output renamed.pdf userpw foo
Warning: Using a password on the command line interface can be insecure.
Use the keyword PROMPT to supply a password via standard input instead.