crates.io · pdfluent

Rust PDF SDK

A PDF library written in Rust for processing, rendering, signing and converting PDF documents. Free under the AGPLv3, with Python, Node.js, WebAssembly, .NET and Java bindings.
SDK · Install

Installation

SDK 1.4.0 is live on crates.io, PyPI, npm, NuGet and the PDFluent Maven repository. What is new in 1.4.0, its benchmark results and the changelog.

Add via cargo:

cargo add pdfluent@1.4.0

Or edit Cargo.toml directly:

toml
[dependencies]
pdfluent = "1"

Enable optional feature flags (XFA, signatures, OCR, etc.):

toml
[dependencies]
pdfluent = { version = "1", features = ["xfa", "signatures"] }
SDK · First call

Quick example

Extract all text from a PDF in five lines:
rust
use pdfluent::PdfDocument;

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

See the full API reference for forms, signatures, rendering, PDF/A conversion, and more, or the Cookbook for ten recipes that are compiled on every release.

SDK · Manipulate

What's included

AcroForms (production-grade)
XFA form processing — experimental, under active development
PDF/A validation and conversion
AES-256 encryption and digital signatures (PAdES B-B, B-T, B-LT)
Text extraction and page rendering
Bindings for Rust, Python, Node.js, Java, .NET and WebAssembly
Written in Rust
No licence key and no activation step

Every licence gets the same SDK. The licences differ on two things: whether you publish your own source, and whether you ship PDFluent inside a product you sell.

SDK · Extract · auto by default since 1.3.0

Structured extraction Preview

New in SDK 1.3.0: quality="auto" is the default extraction tier: table structure, the document's own heading levels and OCR for pages without a text layer. Pass quality="fast" to keep the 1.2 output. On opendataloader-bench SDK 1.4.0 scores 0.9282 overall.* Auto needs a one-time model install, and OCR of scanned pages needs Tesseract on the machine. Release post · Benchmark results*Submitted to the benchmark repository, PR #37 and #38, not on its public leaderboard yet. Measured with the benchmark's own harness on its 200 documents; final macOS arm64 release wheel; other engines as published in its README, not re-run by us. Full caveats on the benchmarks page.

Structured extraction returns Markdown, blocks, words with boxes, and chunks for retrieval pipelines. Blocks carry paragraphs, headings with level, list items, table cells with grid position, and running heads, each with page and box.

Three quality tiers:

  • auto (default from 1.3.0): the balanced tier with the table-structure model, the heading-level model and OCR for pages without a text layer. Without the models it reads the fast tier and says so. Java, C and .NET extraction calls have no quality parameter and follow the engine default [B94, 1.3.0].
  • fast: the engine alone, written in Rust, no models, runs everywhere including WebAssembly. Pass it to keep the 1.2 output.
  • balanced (Preview): runs a layout model and a table-structure model locally through ONNX Runtime 1.23.2 [B49, 2026-10-10]. Native only, never WebAssembly.

Install the models once with pdfluent models install layout tables. pdfluent models status shows what is installed and whether the pins verify.

Structured extraction ships as Preview: output quality is still improving and the API may change in a minor release. Results on opendataloader-bench and on our own 19 measures, each with its tier, date and caveats, are on the benchmarks page.

SDK · Licence

Licensing

PDFluent uses an offline, signed-file licence. Three modes: pick what fits your stage.
Default

Unlicensed (no key)

Use the SDK with no configuration and no licence key. Nothing in the output is stamped.

Free

Free under the AGPLv3

The complete SDK, in production, at any scale. Nothing is withheld and nothing expires. The AGPL asks one thing back: publish your own corresponding source.

Yearly

Commercial licence

The right not to publish your own source. Four self-service buttons, per organisation, or per product when you ship PDFluent inside something you sell. No seats, no quotes.

There is no licence key and nothing to activate. The SDK makes no network call unless you enable an optional OCR or timestamp feature, so it works air-gapped by default. Pricing

SDK licence prices per year, excluding VAT, as of 7 September 2026: Free under the AGPLv3 (€0), Commercial €999 per organisation, OEM Startup €2,499 per product (organisations under €1M revenue), OEM €9,999 per product; priority support is an add-on at €4,999 per year. No trial, no licence key.

SDK · Runtimes

Targets & bindings

Rust, Python, Node.js, WebAssembly, .NET and Java install from a package registry for each language. The bindings call the C API internally; it is not distributed on its own yet.
BindingStatusInstall
Rust (native)Availablecargo add pdfluent@1.4.0Details
PythonAvailablepip install pdfluent==1.4.0Details
WASM / JavaScriptAvailablenpm install @pdfluent/sdk-wasmDetails
Node.jsAvailablenpm install @pdfluent/nodeDetails
.NET / C# PDF SDKAvailabledotnet add package PDFluentDetails
Java PDF SDKAvailablecom.pdfluent:pdfluent:1.4.0
Version 1.4.0 is served from the PDFluent Maven repository at https://maven.pdfluent.com, so add it to your build next to the dependency. Maven Central carries 1.0.0; 1.1.x follows there later.
Details
C APIInternalUsed by language bindings; not separately distributed yet
SDK · Forms

XFA & legacy forms

Render and flatten Adobe LiveCycle / dynamic XFA forms in Rust, with no Adobe runtime, on-prem or in WebAssembly. Evaluation and migration guides:
SDK · Agents

Use it from Claude, Cursor and other agents

pdfluent-mcp is an MCP server that lets an AI client read, search and fill local PDFs. It runs on your machine and does not upload your documents.
Set up pdfluent-mcp

Questions and answers

Is the PDFluent SDK free?
Yes. The complete SDK is free under the AGPLv3, in production and at any scale, with no watermark and nothing that expires. The AGPL asks you to publish your own corresponding source. A yearly commercial licence, bought online with a card, removes that obligation; the prices are on the SDK pricing page.
Do I need a key, an account or a trial?
No. There is no licence key and nothing to activate. The SDK makes no network call unless you turn on an optional OCR or timestamp feature, so it works air-gapped by default.
Which programming languages does the SDK support?
Rust, Python, Node.js, WebAssembly, .NET and Java. Each one installs from the package registry of that language. The C API that the bindings call internally is not distributed on its own yet.
Can the SDK extract text and tables for AI and RAG pipelines?
Yes. Structured extraction returns Markdown, blocks, words with boxes and chunks for retrieval. The default auto tier adds table structure, heading levels and OCR for pages without a text layer. Install the models once with pdfluent models install layout tables; OCR of scanned pages needs Tesseract on the machine. Structured extraction ships as a Preview.
Can I use PDFluent from Claude, Cursor or another AI agent?
Yes, through pdfluent-mcp, an MCP server that reads local PDFs as markdown, plain text, tables or positioned blocks, looks up metadata, searches, lists form fields and fills them into a new file. It runs over stdio on your machine, reads and writes only inside the directories you allow, and does not upload your documents. The setup page is pdfluent.com/mcp/.
Does the SDK handle XFA forms?
It renders and flattens dynamic XFA forms, with no Adobe runtime, on-premises or in WebAssembly. XFA form processing as a whole is still listed as experimental and under active development.
SDK · Install

Start building today

The full SDK, free under the AGPLv3. No sign-up and no key.