Flatten PDF

Turn a completed PDF form into ordinary page content, so the answers stay exactly where they are.

Runs on your devicePDFWorkingNo account needed

What this tool does

Flatten PDF opens the document with pdf-lib, reads its AcroForm, and for each field draws the appearance that field is currently showing directly onto the page content as an XObject, placed at the widget's own rectangle. pdf-lib moves that appearance into position rather than scaling it to fit the box, so what lands on the page is the artwork the field already had. The field is then deleted from the form and its widget removed from the page's annotation list. What was an editable text box, tick box or dropdown becomes marks on the page, and no reader offers to change it again.

One checkbox decides how the values are drawn. Regenerate field appearances first is on by default, and it redraws any field that carries no appearance stream of its own — the ordinary state of a form whose values were written by a script or another program but never rendered. A field that already carries its own appearance is left alone whichever way the box is set. The redraw uses pdf-lib's built-in Helvetica, so a field styled in an unusual face can come out looking different from the way your own reader displays it. Switch the option off when the original appearance matters more than that, and expect a form with unrendered values to stop with an error once it is off, because there is then nothing for the stamping pass to copy.

The word flatten promises more elsewhere than it delivers here, so the boundary is worth stating first. Only form fields are stamped down. Comments, highlights, sticky notes, ink and stamps are annotations of another kind and come through the pass untouched and still editable, while optional-content groups stay as they were. Nothing is rasterised either: the page keeps its vector content, and its text is still selectable and searchable afterwards. Flattening is also not a lock — the fill-in boxes are gone, but anyone with a PDF editor can still alter the page, so if the file needs to resist change it wants a password from Protect PDF instead.

Everything happens in this browser tab and no copy of the file is sent anywhere, which is the point when the form you have just completed carries a name, an address and a bank account. Two documents to keep away from it: one that asks for a password is refused with a pointer to Unlock PDF, and one that has been digitally signed should not be flattened at all, because signature fields are form fields and are removed with the others while the rewrite invalidates the signature in any case.

How to use it

  1. Choose the PDF. One document is processed at a time, but you can queue several and each is flattened separately and returned as its own file. A password-protected PDF cannot be read, so run Unlock PDF over it first.
  2. Decide about the appearance redraw. Leave Regenerate field appearances first switched on and machine-filled values are drawn before they are stamped. Turn it off only when you want each field exactly as its own appearance stream already renders it.
  3. Run it and check the field count. It reports how many form fields went into the page, or says the file had none. The output keeps the original name with -flat added, so form.pdf comes back as form-flat.pdf.

Processing & privacy

Runs on your device. Your file is processed directly in this browser.

Common use cases

Sending back a completed application

The recipient sees the answers as page content rather than a live form, so a stray click in their reader cannot blank a box on the way through.

Settling how a form renders

Two readers can draw the same field differently, and a value written by one program sometimes does not show in another at all. Flattening draws it once and ends the disagreement.

Filing a document after signing it

Sign PDF stamps a visible signature onto the page and leaves the AcroForm exactly as it found it, so a signed copy can still carry live fields. Pass that copy through here and the archived file has no interactive boxes left behind the mark.

Preparing a form for print or imposition

Page-stamping and printing paths that ignore AcroForms will happily output an empty-looking form. With the fields already part of the page, what you see is what comes out.

Questions

Is the filled-in form sent anywhere?
No. pdf-lib is a script served from this site and does the whole job on your own machine, so the file is read, rewritten and handed straight back. The page does record that the tool was opened, but that request carries the tool's name and nothing else — not the document, not its file name, not its contents.
Does it merge layers or bake annotations into the page?
No, and it is better to know that before you rely on it. The pass touches the AcroForm and nothing else, so optional-content layers stay as layers, and comments, highlights, stamps and ink remain annotations a reader can still select and delete.
Can the flattened file still be edited?
Yes, by anything that edits PDFs. Removing the form removes the boxes people type into, not the ability to change the page underneath. Protect PDF adds a password and permission flags; Redact PDF is what removes content outright.
What does “could not be flattened” mean?
pdf-lib refused the document and the tool repeats its reason after that phrase — sometimes naming the offending field, sometimes only describing the part it could not read. The advice printed alongside it, to switch Regenerate field appearances first off, is worth taking carefully: the common cause is a field with no appearance stream, and that case fails with the option off and succeeds with it on. Try it on first, and reach for off only if the complaint clearly came from the redraw itself.
What happens to a PDF with no form in it?
The pages are left exactly as they were and the summary says the file had none. One small thing does change: asking pdf-lib for a form is what creates one, so a document that never had an AcroForm comes back carrying an empty one, and the re-serialisation moves the byte count a little in either direction.
Does flattening turn the pages into images?
No. Only the field appearances are added to the content that was already there, so text stays text and the file stays vector. If you actually want pictures of the pages, export them with PDF to JPG and rebuild the document with Image to PDF.
Can I fill in a form and lock form values in one pass?
Yes — Fill PDF takes the values as a JSON object and has its own flatten option enabled by default. Flatten PDF exists for the other case, where somebody else has already completed the document.

Related tools

  • Merge PDF — Combine several PDFs into one document in the order you choose.
  • Split PDF — Split one PDF into separate documents by page range.
  • Compress PDF — Reduce PDF file size while preserving the quality that matters.
  • PDF to JPG — Export every page of a PDF as a JPG image.
  • JPG to PDF — Turn one or many JPG photos into a single PDF.
  • Protect PDF — Add a password and set permissions on a PDF.