PDF "password protection" is two different features that people mix up constantly.
Two passwords, two jobs
- User (open) password: required to open the file. The content is encrypted with a key derived from it, so without the password the bytes are unreadable.
- Owner (permissions) password: controls permission flags such as printing, copying text, editing, filling forms and assembling pages. The file opens without it.
You can set either one or both. If you set only an owner password, anyone can open and read the document.
Permission flags are a request, not a lock
The permission bits (the /P entry in the encryption dictionary) tell compliant readers what to allow. Acrobat, Chrome, Preview and most viewers respect them. But once a file is open, the content is decrypted, so a non-compliant tool can ignore the flags. Treat "no copy / no print" as a deterrent for honest users, not a security boundary. If the content must stay confidential, use a strong open password.
Pick the right encryption
| Handler | Cipher | Notes |
|---|---|---|
| RC4 40/128-bit | RC4 | Legacy, weak; avoid |
| AES-128 (PDF 1.6) | AES-CBC | Fine for older readers |
| AES-256 (PDF 2.0 / R6) | AES-CBC | Default choice today |
Doing it with qpdf
qpdf --encrypt OPEN_PW OWNER_PW 256 --print=none --extract=n -- in.pdf out.pdf qpdf --show-encryption out.pdf Practical advice
- Send the password through a different channel than the file (SMS or a call, not the same email).
- Length beats complexity: four random words are stronger than "P@ss1".
- Always keep an unencrypted original. A forgotten AES-256 open password is effectively unrecoverable.
Disclosure: I run GoToolsOnline. If you'd rather not use the command line, its free PDF password tool sets separate open and owner passwords, print/copy/edit/form/page restrictions and AES-256 (or AES-128), for up to 20 files at once: https://gotoolsonline.com/tools/pdf-password-protect
