How do you flatten a PDF?
Flattening merges a PDF's form fields, signatures and annotations into the page itself, so the values become part of the printed content and can no longer be edited. FormworkPDF flattens on export by default, rebuilding the file from the original bytes in your browser.
Free, no sign-up, nothing uploaded.
What flattening does
A filled PDF form usually stores your answers twice over. There is the field
value — the string AB12 3CD attached to a field named postcode — and there
is the appearance stream, a small piece of drawing instruction that renders
that string inside the box. The page content itself, the part that was there
before you typed, does not know about either.
Flattening collapses that. The appearance is drawn into the page content, the
field is removed, and what is left is a page that says AB12 3CD in the same
way it says everything else printed on it.
| Unflattened form | Flattened PDF | |
|---|---|---|
| Answers can be edited | Yes | No |
| Renders the same in every reader | Not reliably | Yes |
| Fields can be re-read by software | Yes | No |
| Signature can be dragged off | Yes, if it is an annotation | No |
| Text is selectable | Yes | Yes |
When you actually need it
When you are sending a form back. The recipient should receive an answer, not an editable draft with your answer in it. This is the ordinary case, and it is why the export here flattens by default.
When the other side says it looks blank. The most common support complaint about filled PDFs. Some readers — phone viewers especially, and email preview panes — do not regenerate appearance streams, so a form full of answers arrives looking pristine. Flattening ends that class of bug for good.
When a portal rejects the file. Plenty of upload systems refuse PDFs containing form fields or JavaScript outright, or strip them and lose your answers in the process.
When you have signed it. A signature left as an annotation can be moved or deleted by whoever opens the file next. Drawn into the page, it cannot.
When you should not
Flattening is one-way. Keep the unflattened copy if the form will come back for a correction, if it is a template you reuse, or if anything downstream reads the field values as data. And if the document needs a certificate signature — a cryptographic seal rather than a picture of your name — flatten first and sign second, because flattening rewrites the bytes that a certificate signature covers.
Flattening it in the browser
FormworkPDF flattens on export. The mechanics are worth stating because they determine whether your answers survive:
- The original bytes are kept untouched in memory from the moment you open the file, and every export starts from them again. Filling is never destructive.
- Values are written into the real fields, and anything you placed by hand — text, a signature, initials, a stamp — is drawn at its stored position in PDF points.
- Answers on blanks that were detected rather than declared have no field to write into, so they are drawn straight onto the page as text. They read back out of the finished PDF as text, not as a picture of text.
- The form structure is removed and the file is written out.
All of it happens inside the tab. pdf-lib does the reading and writing in a Web Worker, so a 200-page document does not stall typing, and nothing is uploaded at any point.
The one that bites people
Rasterising a PDF — which is what every compressor does to hit a size target — renders each page with annotations disabled. An unflattened form keeps its values in annotation appearance streams. Compress an unflattened filled form and you get a file of exactly the right size with every answer missing, and no error anywhere to tell you.
That is why shrinking for an upload limit forces a flatten first. It is a silent failure otherwise, and a silent failure on the form you are about to send to a tax office is the worst kind.
Questions people actually ask
- Can a flattened PDF be unflattened?
- Not back into form fields. The values become page content, which is the point. Keep the unflattened original if you might need to change an answer later.
- Why does my filled form look empty on someone else's computer?
- Because the values are living in field appearance streams that their reader is not drawing — a common failure on phone viewers and in email previews. Flattening fixes it permanently: the answers become part of the page, so every reader shows them.
- Does flattening reduce the file size?
- A little, since the form structure goes away, but it is not a compressor. To hit an upload limit, rasterising at a chosen resolution is what actually moves the number.
- Does flattening remove a digital certificate signature?
- It invalidates one. A certificate signature seals a specific byte sequence, and flattening rewrites the file. Flatten first, then apply a certificate signature if you need one — never the other way round.
- Can I flatten only the form fields and keep annotations editable?
- The export here flattens the form: fields and placed items become page content together. If you need annotations kept live, export before adding them.