How to Flatten a PDF (2026)
What flattening a PDF actually does, tested: our PDF Flattener turned a filled form's 2 fields into ordinary page text, kept the web link clickable and the text searchable. Plus when to flatten, why it breaks digital signatures, and what it does not protect against.
What Flattening Does
A PDF can carry interactive layers on top of its page content: form fields, comments, highlights, stamps and drawn signatures. Flattening paints what those layers show into the page itself and removes the interactive objects, so the page looks the same but the fields can no longer be filled in or changed in a form viewer.
We tested our PDF Flattener in Chromium on a form with a filled text field ("Ada Lovelace"), a ticked checkbox and a web link, using its default Keep Text mode, and inspected the result with pypdf and pdftotext:
| Checked | Before | After |
|---|---|---|
| Form fields | member_name, newsletter | none |
| Field widgets on the page | 2 | 0 |
| Web links | 1 | 1 |
| Filled value as page text | no (it lived in the field) | yes |
| Body text searchable | yes | yes |
| File size | 7,100 bytes | 7,094 bytes |
The fields were gone, their values became ordinary page text that search and copy can find, the link stayed clickable, and the body text was untouched. The tool's other mode rasterizes each page into an image, which also flattens everything but loses selectable text, so use it only when a recipient must not be able to copy the text.
When to Flatten
- After filling in a form you are sending as a final record, so the values cannot be edited in a viewer.
- After annotating, so comments and highlights print and display everywhere, including viewers that hide annotations.
- Before printing or archiving, when you want what you see on screen to be exactly what is in the file.
Flattening and Signatures
Two different things are called signatures. A drawn or typed signature placed as an annotation is flattened into the page like any other markup. A digital signature, the cryptographic kind that viewers verify, is different: any change made by rewriting the file after signing, flattening included, makes that signature show as invalid. Flatten first, then sign digitally if you need both.
What Flattening Does Not Do
Flattening is not protection against editing: anyone with a PDF editor can still change page content, and the original field data is gone rather than locked. If you need to prove a document has not been altered, use a digital signature; if you need to stop copying, password protection with restricted permissions is the tool, with the caveat that many programs ignore those permissions.