Fill and flatten AcroForm PDF forms. Passes the PDF 1.7 conformance test suite (Adobe test corpus, 304 tests). Import data from FDF, XFDF, or JSON.
use pdfluent::PdfDocument;
fn main() -> pdfluent::Result<()> {
let mut doc = PdfDocument::open("form.pdf")?;
println!("{} form field(s)", doc.form_fields()?.len());
doc.form_mut()
.set_text("name", "Jane Smith")?
.set_checkbox("subscribe", true)?;
doc.save("filled.pdf")?;
Ok(())
}Run cargo add [email protected] to get started.
Fill standard AcroForm PDF forms. Support for text fields, checkboxes, radio buttons, dropdowns, and list boxes. Works with all major form generators.
Complete AcroForm fill and flatten implementation. Passes the PDF 1.7 conformance test suite (Adobe test corpus, 304 tests). No known regressions.
Permanently embed form data into the page content. Output is a static PDF — no form fields remain, no Reader required to view.
Import form data from FDF, XFDF, or JSON. Batch-fill thousands of forms from a database or spreadsheet.
Export filled form data as FDF, XFDF, or JSON. Extract submitted values for processing or archival.
Validate form field values against constraints: required fields, character limits, numeric ranges. Get a validation report before flattening.