Flattening
Merging all annotations, form fields, and overlays into the base page content — producing a non-interactive PDF where no elements can be edited or filled.
Flattening a PDF means permanently merging all interactive or overlay elements — annotations, form field values, overlays, comments, and stamps — into the base page content so they become inseparable from the page. After flattening, there are no distinct layers: every visible element is baked into a single, unified content stream. The result is a simpler, more portable document that looks identical to the original but no longer supports editing, form filling, or layer manipulation.
The term comes from the idea of collapsing a stack of transparent sheets into a single opaque one. A PDF with annotations is conceptually a base page (the original content) with a transparent overlay layer on top. Flattening takes everything on the overlay and draws it directly into the base, then discards the overlay layer entirely.
Flattening is a one-way operation. There is no "unflatten" function. Once a PDF is flattened and saved, the individual elements — the form field that held a user's typed name, the highlight annotation marking a passage, the signature image placed over a signature line — no longer exist as separate objects. They are pixels and vectors in the page content, indistinguishable from the original document.
What gets flattened
Depending on which flattening operation is applied, different elements are merged:
**Form field flattening** — The most common type. Filled form field values (text inputs, checkboxes, radio buttons, dropdown selections) are drawn into the page content at their positions, and the form field objects are removed. The PDF becomes a non-interactive document showing the values the user entered, as if they had always been printed there.
**Annotation flattening** — Highlights, sticky notes, stamps, shapes, freehand drawings, and other annotation types are merged into the page. After flattening, you cannot select or delete individual annotations — they are part of the page image.
**Signature flattening** — Graphical signature images placed as overlays are merged into the page content. Note: cryptographic digital signature fields behave differently and should not be flattened, as this would invalidate the digital signature.
**Transparency flattening** — A separate concept in PDF print production. PDF pages can contain transparent objects; some printing workflows require these to be rasterised into opaque content before output. This is also called flattening and is handled by the print RIP (Raster Image Processor).
When to flatten a PDF
Flattening is appropriate in several common scenarios:
**Finalising a completed form** — After a form recipient has filled in all fields and the document needs to be archived or forwarded as a completed record, flattening prevents the values from being changed and makes the form readable in all viewers, including those that do not support interactive forms.
**Before archiving as PDF/A** — The PDF/A standard for long-term archiving restricts certain features, including some annotation types and interactive form fields. Flattening ensures the document complies with PDF/A requirements.
**Before printing** — Some print workflows and printers do not correctly render annotation layers or form fields. Flattening before sending to print guarantees the output matches the on-screen appearance.
**Sharing a finalised document** — If you want to share a PDF as a "finished" document where reviewers' comments are visible but cannot be removed, edited, or exported separately, flattening makes the comments permanent parts of the page.
**Reducing file complexity** — Flattening removes annotation objects, appearance streams, and form field dictionaries, simplifying the PDF structure and often reducing file size slightly.
Flattening vs saving with embedded values
There is a subtle distinction between flattening a form and simply saving a filled form. When a user fills a PDF form and saves it without flattening, the field values are stored in the field dictionaries — the form is still interactive, the values can be changed, and the fields can be cleared. This is the normal "save filled form" behaviour.
Flattening goes further: it permanently converts those field values into page content and removes the field objects. The form is no longer interactive at all — it looks like a printed version of the filled form.
For recipient-side workflows where you want to lock in the values but keep the form structure for inspection, saving without flattening is appropriate. For archival, distribution, and print, flattening is the correct choice.
Frequently asked questions
What does flattening a PDF do?
Flattening permanently merges annotations, form field values, overlays, and other interactive elements into the base page content. After flattening, these elements are part of the page itself — they cannot be separately selected, edited, or removed.
Is PDF flattening reversible?
No. Flattening is a destructive, one-way operation. Once flattened and saved, the individual elements no longer exist as separate objects. Always keep an unflattened copy if you may need to edit it later.
Does flattening reduce PDF file size?
Often slightly. Flattening removes annotation objects, appearance streams, and form field dictionaries. However, if transparency flattening rasterises vector elements, file size can increase. The net effect depends on the document content.
Should I flatten a PDF before printing?
It depends on the printer and workflow. Most modern printers and PDF viewers handle annotations and form fields correctly. If you are experiencing print discrepancies — elements missing, fields not showing values — flattening before printing can resolve them.
Does flattening affect digital signatures?
Yes, negatively. Flattening the page content changes the document's byte sequence, which invalidates any PKI-based digital signatures on the document. Never flatten a PDF that contains digital signatures you want to keep valid. Graphical signature images (overlays) can be flattened safely.