Solutions

PDF forms that actually fill.

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.

Code example

rust
use pdfluent::{Sdk, forms::{FormData, FlattenOptions}};

let sdk = Sdk::init_with_license("license.json")?;
let doc = sdk.open("w-2_form.pdf")?;

let mut data = FormData::new();
data.set_text("f1_1", "Jane Doe")?;
data.set_text("f1_2", "123-45-6789")?;
data.set_text("f1_3", "Acme Corp")?;
data.set_number("f2_1", 45000.00)?;

let filled = doc.fill_form(data)?;
let opts = FlattenOptions::builder()
    .embed_fonts(true)
    .preserve_annotations(false)
    .build();

let static_pdf = filled.flatten_forms()?;
static_pdf.save("w-2_filled.pdf")?;

println!("Fields filled: {}", filled.field_count());

Run cargo add pdfluent@1.0.0-beta.5 to get started.

What it does

AcroForm support

Fill standard AcroForm PDF forms. Support for text fields, checkboxes, radio buttons, dropdowns, and list boxes. Works with all major form generators.

PDF 1.7 conformance suite

Complete AcroForm fill and flatten implementation. Passes the PDF 1.7 conformance test suite (Adobe test corpus, 304 tests). No known regressions.

Flatten forms

Permanently embed form data into the page content. Output is a static PDF — no form fields remain, no Reader required to view.

Data import

Import form data from FDF, XFDF, or JSON. Batch-fill thousands of forms from a database or spreadsheet.

Data export

Export filled form data as FDF, XFDF, or JSON. Extract submitted values for processing or archival.

Field validation

Validate form field values against constraints: required fields, character limits, numeric ranges. Get a validation report before flattening.

Deployment options

Server-side (Rust binary)Docker containerAWS LambdaWebAssembly (browser)

Frequently asked questions