How PDF Forms Work: AcroForm Fields and What Flattening Does

There are two completely different things that both get called a PDF form. The first is a page with lines and boxes printed on it, which is a form the way a paper form is a form: you can see where to write, but the file has no idea what a name field is. The second is an interactive form built on the AcroForm mechanism defined in the PDF standard, where the boxes are real objects with names, types and values. Everything confusing about forms comes from the gap between these two, so it is worth seeing how the interactive kind is put together.

In an AcroForm, the document catalogue holds a dictionary listing the form fields. Each field is an object with a type such as text, button or choice, a partial name, an optional parent for grouping, and a value. Its visible counterpart is a widget annotation attached to a page, carrying the rectangle where it appears and its appearance characteristics. Field and widget are frequently the same object serving both roles. Notice what this means structurally: the interactive parts are annotations layered over the page, not operators inside the page content stream that draws the underlying text and lines.

How a filled field looks on screen is governed by its appearance stream, a miniature content stream that draws the current value in the right font inside the rectangle. Well-behaved software regenerates it whenever the value changes. Some generators instead set a flag asking the reader to build appearances itself, which is why a form can look empty in one application and populated in another, or why fields sometimes render only after you click into them. The value and the picture of the value are stored separately, and they can disagree.

Flattening resolves that separation permanently. The tool renders each field's appearance stream into the page's own content stream, so the text you typed becomes ordinary drawing operators sitting alongside the printed lines, and then it removes the annotations and the AcroForm entry. Afterwards there are no fields at all: nothing is clickable, nothing can be edited, and every viewer shows exactly the same result because nothing is being generated at display time. You have traded editability for certainty, which is usually the right trade for a document you are sending onward.

The practical guidance follows from that. Fill an interactive form in a reader that regenerates appearances, then flatten before you send it, especially if the recipient will print it or open it on a phone. If your document is the first kind of form, a scan with no field objects anywhere, no amount of flattening applies; run OCR to give it a searchable text layer, and use sign to place your marks and signature on the page. PdfWill does both locally in the browser, so an application packed with personal details never has to be uploaded to be completed.

Related tools