Skip to content

Flatten PDF

Turn fields and comments into ordinary page content.

Drop a PDF here

Only your browser reads them.

How to use Flatten PDF

  1. Add your PDF. Drop a file with form fields or markup onto the upload zone or click Choose a file.
  2. Review what will be locked. Confirm that fillable form answers, highlights, stamps, and drawings are ready to become non-editable page content.
  3. Click Flatten PDF. The Web Worker renders every field and annotation appearance directly into the page stream.
  4. Save or secure the output. Download the flattened file or pass it directly to Compress or Add a password.

Your files are processed on this device and never uploaded. They stay private, and there's nothing to delete afterwards.

How does vector PDF flattening merge forms and annotations?

Vector flattening bakes interactive form fields and markup annotations directly into each page’s static content stream inside a Web Worker, keeping 0 bytes on any remote server when you flatten a PDF without uploading online. Because the worker transfers vector appearance streams rather than rasterizing pages to pixels, text remains crisp, searchable, and compact.

Flattening also prevents a common issue where PDF form fields show blank after saving in lightweight previewers that ignore interactive widget layers. Every answer is drawn into the page itself so the document looks identical on desktop, mobile, and print queues.

Isolating page graphics state and drawing appearance streams

Under the PDF Association ISO 32000-2 Specification, form widgets and annotations sit in a separate /Annots layer above the page canvas and store their visual representation in an /AP (/N) appearance stream. Before appending those streams, the flattener wraps existing page content in q and Q graphics-state operators so transforms or colors from the page never leak into flattened stamps.

For each visible annotation, the worker computes an affine appearanceMatrix() mapping the appearance bounding box onto the annotation’s /Rect coordinates. If you still need to type into an interactive form before locking it, you can complete interactive PDF form fields in your browser first.

Fallback vector drawing for appearance-less highlights and boxes

Some lightweight PDF viewers create /Highlight, /Underline, /StrikeOut, or /Square annotations without writing a pre-rendered /AP appearance stream. Naive flatteners skip those markups, causing highlights to vanish.

This tool includes a dedicated fallback path that reads /QuadPoints and /Rect coordinates to draw vector highlights (default 0.35 opacity), underlines, strikeouts, and 1.5 pt square borders directly onto the page.

Not every entry in a PDF’s /Annots array should be baked into static graphics or discarded blindly. The flattener classifies each annotation subtype so clickable navigation survives while editable clutter disappears.

Annotation or object type Flattening behavior Resulting PDF state
AcroForm fields (PDFTextField, etc.) Drawn via form.flatten() Static text and checkmarks; fields removed
Stamps, ink drawings, sticky icons Drawn from /AP /N stream Fixed vector or image graphics on page
Appearance-less highlights & squares Drawn via vector fallback Preserved with /QuadPoints and opacity
Hyperlinks (/Link) Kept in /Annots array Remains clickable in all PDF viewers
Pop-up comment windows (/Popup) Removed with parent Prevents empty floating note boxes
Hidden / NoView flags (bits 2, 32) Stripped without drawing Hidden draft notes never appear in output

Annotation flag bits and content-stream rules follow the Library of Congress PDF 1.7 Format Description. Once a document is flattened, if you ever need to add new interactive boxes back onto a static template, you can convert static pages into fillable forms in a separate step.

Flattening versus password protection and archival PDF/A

Flattening and encryption solve two distinct security problems: flattening removes interactive mutability and viewer inconsistencies, while encryption restricts file access. Understanding when to use each keeps finalized records both readable and protected.

When to flatten versus encrypt with AES-256

Flattening makes form answers and stamps part of the static page so they display reliably in browser previews, mobile mail apps, and print queues without accidental edits. However, anyone with a full PDF editor can still edit static page text unless the file is encrypted.

After clicking Flatten PDF, use the result panel’s one-click handoff to add a password (AES-256) if you also need to restrict opening or printing.

Preparing locked contracts and court electronic filings for archiving

Long-term records retention under the PDF Association ISO 19005 PDF/A Standard requires self-contained, deterministic visual appearances without dynamic form scripts or unrendered widget states. Flattening interactive widgets before archiving eliminates viewer-dependent rendering differences across decades.

Court electronic filing portals and government submission gateways also require flattened PDF documents because live scripts, mutable fields, and floating review comments can fail automated intake validation. Once flattened, you cannot unflatten a PDF back into editable form fields, so always archive your original editable draft separately.

Troubleshooting fonts, empty pages, and post-flatten compression

Most flattening errors happen when a form contains characters missing from its embedded font or when a PDF has no interactive elements left to flatten. Checking those details avoids failed exports on complex submissions.

Handling non-Latin form fonts and pruning orphaned objects

If a form field contains characters that its embedded WinAnsi font cannot draw, form.flatten() throws a clear message instead of producing corrupted glyphs. When a PDF has 0 form fields and 0 flattenable annotations, the tool reports that the file is already flat.

Tip: Always keep an unflattened copy of active templates before running Flatten PDF, because flattening removes interactive field definitions and prunes orphaned objects permanently.

After baking appearances into the page stream, the worker runs pruneUnreachable() to strip unreferenced widget dictionaries and appearance streams so file sizes stay lean. Removing those orphaned objects can noticeably reduce file size on long multi-page packets that previously carried dozens of redundant font and widget definitions.

Compressing and archiving finalized PDF documents

Every flattened file conforms to the IETF RFC 8118 PDF Media Type (application/pdf) for universal sharing. From the completion card, you can hand the locked file straight to Compress to shrink embedded images, or pass it to our ISO 19005 archival PDF/A converter for court and compliance storage.

Questions

Why should I flatten a PDF before sending it?

Flattening turns editable form fields and floating annotations into ordinary page content so recipients cannot alter your answers. It also ensures filled text renders consistently in mobile and web viewers that handle interactive forms poorly.

Do hyperlinks still work after flattening a PDF?

Yes. The flattener explicitly preserves /Link annotation objects inside each page's annotation array while flattening forms and markup, so clickable web links and document jumps continue working normally.

Does flattening a PDF turn text into blurry images?

No. Unlike print-to-image workflows that rasterize every page, this tool copies vector appearance streams and draws fallback vector shapes directly into the PDF content stream so text stays sharp and selectable.

Can a flattened PDF be unflattened later?

No. Once form widgets and annotation dictionaries are baked into static page content and pruned, the original interactive field metadata is gone. Keep a backup of the unflattened PDF if you still need to edit values.

What happens to hidden annotations and pop-up notes?

Hidden or non-viewing annotations (with PDF flag bits 2 or 32 set) and floating /Popup comment windows are stripped without drawing onto the page, keeping internal review notes out of the final copy.

Is flattening a PDF the same as locking it with a password?

No. Flattening removes interactive fields and annotations so they look fixed, whereas password protection encrypts the file to control who can open, print, or modify it. You can chain both steps together.

Updated