Channel guide

PDFluent for Rust

Generally availableUpdated 2026-05-14
Star on GitHub
On this page

Install

One command. The package is on crates.io today.

cargo add pdfluent@1.0.0

Smoke test

Open a PDF, print the page count. The example below is the smallest useful program — copy, paste, run.

rust
use pdfluent::PdfDocument;

fn main() -> pdfluent::Result<()> {
    let doc = PdfDocument::open("invoice.pdf")?;
    println!("{} pages", doc.page_count());
    Ok(())
}

Try XFA flattening in the browser

Before writing any Rust, you can see the XFA flattener work on a real form: the XFA Flatten playground demo runs the same code as this SDK, entirely in your browser via WebAssembly — nothing is uploaded. Drop in an XFA form and download the flattened, static result.

What this is good for

  • Server-side document pipelines
  • Native CLI tooling
  • Embedding the SDK in Rust services and workers

Current limitations

This list is honest, not exhaustive. The site-wide list lives at Known limitations.

  • XFA rendering fidelity is improving; complex dynamic forms may render with visual deltas.
  • PDF/A conversion currently covers PDF/A-1b, 2b, and 3b. Uncommon profiles are scoped for later releases.

Licensing

PDFluent is published under the AGPLv3 and is complete under it. A yearly commercial licence removes the obligation to publish your own source; nothing in the build differs and nothing is activated, so a lapsed licence breaks nothing you have shipped. Details on the licensing page.

Where to go next