CaseLeaf

Handbook / Protection

Protection

This page explains what a password on a PDF actually protects against. The answer is short, and most applications never state it clearly.

What CaseLeaf can do

When you make marks permanent, the copy can be written so it refuses copying and editing in readers that honour that.

The trick is an owner password and no user password: the file opens with no prompt, in any reader, on any platform, and carries flags saying extraction and editing are not allowed. Mainstream readers honour those flags, so a vector editor asks for a password before letting anyone lift a signature out of the page.

Printing stays allowed. A file that cannot be printed cannot be filed.

You are never asked for a password to open such a copy, and neither is anyone else. The password is random and is not kept anywhere. Nobody is meant to know it. Its only job is to make the permission flags stick.

What it is worth

Very little, against anyone who knows one command. The command strips the protection without needing the owner password:

$ qpdf --decrypt locked.pdf unlocked.pdf
extraction allowed again: True   encrypted: False

The file decrypts with the empty user password, so the flags come off for anyone who knows that command exists.

It stops only readers that choose to honour the flags. That is the understanding it is offered on. It raises the cost of casually lifting a signature or a passage out of a document. It does not stop a determined person, and nothing in the PDF format can.

Getting an unprotected copy back

With the owner password, Legal ▸ Remove the Protection… writes an unprotected copy beside the document and opens it. The document you opened is not changed: nothing is written into it, and nothing waits for a save. The same offer appears when you try to mark a document that refuses marks.

A copy this application protected without a password of your choosing cannot be unlocked, by this application or any other. The password was random and is not kept. Make it again from the original.

Saving a protected file keeps it protected, with copying still disallowed. That is why the way off is a rebuilt copy, never a save of the file itself. Outside this application, qpdf --decrypt does the same.

Documents that arrive with a password

A document that needs a password to open still needs it on disk even after you have opened it on screen. Making marks permanent on one would produce a blank copy, so it is refused with that explanation. Open it, give the password, save it unprotected, then make the copy.

A note on limits

A password given here is cut to 32 bytes, which is what PDF's standard security handler takes. The system's PDF writers do not reject a longer password. Instead, they write the file with no encryption at all, the worst possible outcome. So trimming is the only approach that never silently produces an unprotected file while reporting success.

Watch: a short video for this page is still to come.


Contents