How Flatten PDF works
PDF Flatten merges all interactive form fields and annotation appearances permanently into the underlying page content. After flattening, the text typed into fields, the checkboxes ticked, the highlights added, and any other annotation layer are fixed visual elements that no reader or editor can change. The output looks identical to the annotated version, but the AcroForm layer is gone. pdf-lib performs this operation inside your browser, and the PDF remains on your device from start to finish.
Flattening is the right step before archiving a completed form, sharing a signed document, or distributing a document where you want to prevent any further annotation. Unlike printing to PDF, which re-rasterises the whole page, flatten preserves the vector content of the page and only removes the interactive layer, keeping the file compact and the text selectable. Note that flattening is irreversible: the original interactive fields cannot be recovered from the output file, so keep a copy of the original if you might need to revise the fields later.