XFA forms are not supported by this readerXFA (XML Forms Architecture) is an Adobe-proprietary form format that only Adobe Acrobat and Reader support. Most modern PDF viewers — including browsers, macOS Preview, and open-source viewers — show a blank page or this error. The fix is to convert XFA forms to standard AcroForms.
XFA is an Adobe proprietary standard that requires a dedicated rendering engine. Browsers (Chrome, Firefox, Safari), macOS Preview, Linux PDF viewers (Evince, Okular), and most non-Adobe mobile apps do not implement XFA. They display the fallback content defined in the PDF — often a blank page or a message asking the user to open in Acrobat.
Adobe deprecated XFA in PDF 2.0 (ISO 32000-2) and has been discouraging its use since 2017. Even in Adobe Reader, XFA support may be disabled in newer versions or restricted in certain deployment modes (e.g. Reader in browser mode).
XFA PDFs can optionally include a pre-rendered AcroForm representation for viewers that don't support XFA. If the creator didn't include a fallback, non-XFA viewers render a blank page. This is the most common reason the form appears completely empty.
PDFluent can convert XFA-based forms to standard PDF AcroForms that any viewer can render and fill. The conversion preserves field names, values, and layout.
use pdfluent::Document;
let doc = Document::open("xfa-form.pdf")?;
// Check if the document uses XFA
if doc.has_xfa() {
// Convert XFA to standard AcroForm
let converted = doc.xfa_to_acroform()?;
converted.save("acroform-output.pdf")?;
println!("XFA converted to AcroForm successfully");
} else {
println!("Document does not use XFA");
}If you don't need the fields to remain interactive — for example, you're archiving a completed form — flatten the XFA into a static PDF. This removes all form logic and produces a plain document any viewer can display.
use pdfluent::Document;
let mut doc = Document::open("completed-xfa-form.pdf")?;
// Flatten XFA into a non-interactive static PDF
doc.flatten_xfa()?;
doc.save("flattened-output.pdf")?;For complex XFA forms where layout preservation is critical, extract the XML data and regenerate the output using PDFluent's PDF generation API with standard rendering. This gives you full control over the output format.
use pdfluent::Document;
let doc = Document::open("xfa-form.pdf")?;
// Extract submitted data as XML
let xfa_data = doc.extract_xfa_data()?;
println!("XFA data: {}", xfa_data.to_xml_string());
// Use the data to render a new standard PDF
// with your own template
let mut output = Document::new();
let mut page = output.add_page((595.0, 842.0));
page.draw_text(50.0, 750.0, &xfa_data.field("name")?)?;
output.save("regenerated.pdf")?;