XFA Flatten

Flatten XFA Forms

Drop an XFA form (the dynamic, LiveCycle-style PDF that shows “Please wait…” in viewers that don’t support it) and get back a plain, static PDF — the form layout rendered into ordinary page content, with no XFA and no AcroForm left behind. Opens anywhere.

How it works

XFA (XML Forms Architecture) forms store their layout as XML templates rather than fixed PDF content. Dynamic XFA forms are essentially a mini-app the viewer renders on the fly — which is why they break in most readers, mobile, and print pipelines, showing only a grey “please wait” placeholder.

The Foxit PDF SDK loads the XFA document, lays out the template with its data, and calls XFADoc::FlattenTo() to bake that layout into normal PDF page content. A second PDFPage::Flatten() pass removes any leftover form widgets, so the result is a clean, static PDF — no XFA, no AcroForm — that renders identically everywhere. Text stays text; nothing is rasterized.

Drop a regular PDF and the demo will tell you it isn’t an XFA form rather than touching it.