How to restrict changes to a pdf using permissions and flattening
- Step 1Flatten the document first (if it has form fields or annotations) — Run PDF Flatten to bake form fields, comments, and layers into the page content. This removes the editable structure that an editor would otherwise let a recipient change — the most effective edit-prevention step.
- Step 2Open the Permission Setter and drop the flattened PDF — Load the document into the PDF Permission Setter. Free tier handles files up to 2 MB / 50 pages.
- Step 3Set an owner password — Enter a strong owner password. A conformant editor will warn that the file is permission-protected and require this password to lift restrictions.
- Step 4Tick the restrictions you do want — Block printing and/or Block copying as needed. Note these are the only two controls — there is no edit toggle, so modification stays at
--modify=all. - Step 5Run and download — qpdf re-encrypts with AES-256 and writes the new permission dictionary. Save the locked file.
- Step 6Verify the lock in a real editor — Open the output in Acrobat: it should report the document is secured. Confirm the flattened content has no editable fields left.
What this tool controls vs. what it doesn't
The Permission Setter exposes two checkboxes. Modify is always left enabled because there is no UI for it.
| Permission | Exposed in this tool? | Value actually sent |
|---|---|---|
| Printing | Yes — Block printing checkbox | --print=none (blocked) or --print=full |
| Copying / text extraction | Yes — Block copying checkbox | --extract=n (blocked) or --extract=y |
| Document modification (edit) | No toggle | Always --modify=all (editing left allowed) |
| Annotation / commenting | No separate toggle | Governed by qpdf's --modify level, left at all |
| Form filling | No separate toggle | Governed by --modify=all, so filling is allowed |
How to genuinely prevent edits
Permission flags are advisory to conformant editors. Flattening changes the document structure so there is nothing editable to begin with.
| Goal | Right tool | Why |
|---|---|---|
| Stop form fields being changed | PDF Flatten | Bakes fields into static page content — no field to edit |
| Stop comments/annotations being altered | PDF Flatten | Merges annotation layer into the page |
| Stop printing / copying | PDF Permission Setter (this tool) | Sets --print=none / --extract=n |
| Stop the file being opened at all | PDF Password Protect | Sets an open (user) password |
| Prove the file wasn't changed | PDF Digital Signature | Cryptographic signature detects any post-sign edit |
Cookbook
Recipes for shipping a finalised document that resists edits — using the right combination of tools.
Lock a signed contract against casual editing
A countersigned agreement distributed as the record copy. Flatten any signature/annotation layers, then set an owner password so Acrobat flags it as secured.
Step 1 PDF Flatten → bakes annotations into pages
Step 2 PDF Permission Setter
Owner password: contract-final-7
Block printing: OFF Block copying: OFF
Result: AES-256 secured; Acrobat warns 'permissions password required'
Note: modify is still --modify=all — flattening is what removes editabilityA certificate that should print but never be altered
A training certificate the holder may print but should not edit the name on. Flatten first so the name isn't a form field, then lock copying.
Step 1 PDF Flatten → name field becomes static text
Step 2 PDF Permission Setter
Owner password: cert-issuer-22
Block copying: ON → --extract=n
Block printing: OFF → --print=full
Result: prints fine; the name is baked-in pixels-of-text, not an editable fieldWhat the tool sends for an 'edit-restricted' run
Even with both boxes ticked, modification is left enabled. This is the exact qpdf invocation.
qpdf --encrypt "" "owner-pw" 256 \
--print=none --extract=n --modify=all \
-- in.pdf out.pdf
^^^^^^^^^^^^^ editing still allowedMake it tamper-evident instead of edit-locked
If your real requirement is proving the document wasn't changed (rather than blocking the change), a digital signature is the correct tool.
Tool: PDF Digital Signature
Input: spec-final.pdf
Result: any later edit breaks the signature; recipients can
confirm integrity with PDF Signature VerifySpec document: flatten, watermark, lock
A published technical spec that must look official and resist tampering. Combine flatten, a FINAL watermark, and an owner password.
Step 1 PDF Flatten Step 2 PDF Watermark → "FINAL v3.2" Step 3 PDF Permission Setter → owner password set, Block copying ON Result: no editable fields, visible version marker, AES-256 secured
Edge cases and what actually happens
No modify / edit checkbox in the tool
by designThe Permission Setter UI exposes only Block printing and Block copying. The modify permission is always sent as --modify=all, so the PDF-level 'editing allowed' flag stays on. To prevent editing in practice, flatten the document with PDF Flatten and rely on the owner password to flag the file as protected.
Recipient edits the file in a non-conformant editor
by design (PDF limitation)Even where a modify flag is set, PDF permissions are advisory — a conformant editor honours them, but specialist editors can ignore them and edit anyway. The only robust 'cannot be edited' is to remove editable structure (flatten) and/or detect changes cryptographically with PDF Digital Signature.
Form fields remain editable after setting permissions
expectedBecause modify stays at --modify=all, an AcroForm's fields are still fillable/editable after a permission run. Flatten the form first with PDF Flatten so the fields become static content. See also Lock a PDF to form filling only.
Owner password left empty
errorThe owner password is required; running with it blank raises 'Enter an owner password.' before encryption. Without it there is no key to protect any permission flag.
Annotations can still be added
expectedThere is no separate annotation toggle, and modify is left at all, so a conformant viewer can still let users add comments. Flatten before locking if comments must not be added.
File already password-protected
limitedqpdf cannot re-encrypt a file it can't open. Remove the existing password with PDF Unlock first, then flatten and set permissions.
Corrupted PDF
qpdf errorqpdf exits code 2 with 'qpdf could not process this PDF — it may be corrupted or use an unsupported encryption.' Repair it with PDF Repair before retrying.
File over the tier limit
blockedFree tier caps at 2 MB / 50 pages; Pro at 50 MB / 500 pages. A larger file is blocked before processing with an upgrade prompt.
Frequently asked questions
Can this tool disable editing of a PDF?
Not directly. The Permission Setter exposes only two restriction checkboxes — Block printing and Block copying — and always sends --modify=all, leaving the modification permission enabled. To genuinely prevent content edits, flatten the document with PDF Flatten so there are no editable fields or layers, and set an owner password so conformant editors flag the file as protected.
Why is there no 'block editing' checkbox?
The tool's UI was built around the two protections most people actually need on a distributed document — print and copy — and binds them with AES-256 encryption. Document-modification is left enabled. We document this honestly rather than implying an edit lock that isn't there. Flattening is the reliable substitute for stopping edits.
Does flattening really stop editing?
It stops the most common edits: form-field changes, annotation/comment changes, and layer edits, because PDF Flatten bakes them into static page content. It does not make the underlying page graphics impossible to alter in a determined editor, but it removes the easy, structured editing paths. Combine with a digital signature if you also need to prove nothing changed.
If I tick both checkboxes, is the document edit-locked?
No. Ticking both Block printing and Block copying sets --print=none and --extract=n, but modification stays at --modify=all. The document can still be edited in a conformant editor by someone who supplies the owner password — or in a non-conformant editor regardless.
How do I make a contract that can't be altered?
Two complementary approaches: (1) flatten with PDF Flatten and set an owner password here so it's marked protected; (2) for proof of integrity, apply a PDF Digital Signature — any later edit breaks the signature and is detectable with PDF Signature Verify.
Will Acrobat warn that the file is protected?
Yes. Because the file is AES-256 encrypted with an owner password, Acrobat shows it as a secured document and prompts for the permissions password before allowing restricted operations. That deterrent applies even though the modify flag itself is left enabled.
What encryption is used?
AES-256 (qpdf's 256-bit / R6 handler), with your owner password protecting the permission dictionary and an empty open password so the file opens without a prompt.
Is the document uploaded?
No. qpdf runs in your browser via WebAssembly. The contract, certificate, owner password, and output never leave your device; only an anonymous counter is recorded when signed in.
Can I block annotations / comments specifically?
There is no annotation-only toggle, and modify is left at all, so a conformant viewer can still allow comments. To prevent annotations, flatten the document first with PDF Flatten.
How do I remove the protection later?
Use PDF Remove Password with the owner password you set. It strips the AES-256 encryption and all permission flags.
Does setting an owner password stop me opening the file?
No. The owner password protects permissions; it is not an open password. The file opens without a prompt because the user password is left empty. To require a password to open, use PDF Password Protect.
What's the size limit for editing-restriction runs?
Same as all PDF tools: free tier 2 MB / 50 pages, Pro 50 MB / 500 pages, Pro + Media 500 MB / 2,000 pages. Single file per run — no batch mode.
Privacy first
All PDF processing runs locally in your browser using PDF-lib and pdf.js. No file is ever uploaded — only metadata counters are saved for signed-in dashboard stats.