How To Open ‘Protected’ PDFs on Linux

I’ve received several PDF documents lately that would only open in Adobe’s Acrobat Reader without being asked for a password. In Acrobat Reader, the document is then usually ‘protected’ against printing, annotation and/or other things one does with a PDF. Unfortunately that doesn’t help me much because I won’t install the closed source Adobe Reader on my notebook. No way.

But here’s a quick fix: Files that Evince and Okular can’t open can still be viewed with the Firefox PDF viewer. Nice, but it’s still a major pain. So I spent some time to see if this annoyance could be removed. And indeed there is a simple solution:

To remove what is referred to as ‘owner protection’ with an empty password, use ‘qpdf’ in a shell:

qpdf --decrypt in.pdf out.pdf

And that’s it, no password required. After that, the PDF file can be opened in Evince and Okular and has no restrictions on what can be done with it, including printing it, modifying it, etc.

Qpdf also has a command line option to show which actions are ‘not allowed’ when an empty owner is set password:

qpdf --show-encryption in.pdf 

R = 6
P = -1084
User password = 
extract for accessibility: allowed
extract for any purpose: not allowed
print low resolution: allowed
print high resolution: allowed
modify document assembly: not allowed
modify forms: allowed
modify annotations: not allowed
modify other: not allowed
modify anything: not allowed
stream encryption method: AESv3
string encryption method: AESv3
file encryption method: AESv3