# Rust PDF SDK — PDFluent

Source: https://pdfluent.com/sdk/

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.

[Install the free SDK](https://pdfluent.com/docs/)[View pricing](https://pdfluent.com/sdk/pricing/)

SDK · Install

## Installation

Current release: SDK 1.5.0. Also see [what is new in 1.5.0](https://pdfluent.com/blog/sdk-1-5-0/), [what was new in 1.4.0](https://pdfluent.com/blog/sdk-1-4-0/), [its benchmark results](https://pdfluent.com/benchmarks/#odl-140) and the [changelog](https://pdfluent.com/changelog/).

Add via cargo:

cargo add pdfluent@1.5.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](https://pdfluent.com/docs/) for forms, signatures, rendering, PDF/A conversion, and more, or the [Cookbook](https://pdfluent.com/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.

[Full feature list](https://pdfluent.com/features/)

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.5.0 scores 0.9288 overall.* Auto needs a one-time model install, and OCR of scanned pages needs Tesseract on the machine. [Release post](https://pdfluent.com/blog/sdk-1-3-0/) · [Benchmark results](https://pdfluent.com/benchmarks/#odl-bench) *Not on its public leaderboard. SDK 1.3.0 results were submitted to the benchmark repository, PR #37 and #38. Measured with the benchmark's own harness on its 200 documents; macOS arm64 wheel built from the 1.5.0 release candidate; 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](https://pdfluent.com/benchmarks/).

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.

[Install it](https://pdfluent.com/docs/)

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.

[View pricing](https://pdfluent.com/sdk/pricing/)

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](https://pdfluent.com/sdk/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.

EU and EEA public sector bodies may use the SDK free of charge under a commercial licence. The organisation must email hello@pdfluent.com first with its name and intended use.

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.

Calls enter the core and return.

| Binding | Status | Install |  |
| --- | --- | --- | --- |
| Rust (native) | Available | cargo add pdfluent@1.5.0 | [Details](https://pdfluent.com/docs/) |
| Python | Available | pip install pdfluent==1.5.0 | [Details](https://pdfluent.com/docs/python/) |
| WASM / JavaScript | Available | npm install @pdfluent/sdk-wasm | [Details](https://pdfluent.com/docs/wasm/) |
| Node.js | Available | npm install @pdfluent/node | [Details](https://pdfluent.com/docs/node/) |
| .NET / C# PDF SDK | Available | dotnet add package PDFluent | [Details](https://pdfluent.com/docs/dotnet/) |
| Java PDF SDK | Available | com.pdfluent:pdfluent:1.5.0 Version 1.5.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](https://pdfluent.com/docs/java/) |
| C API | Internal | Used by language bindings; not separately distributed yet |  |

Registries [Rust crates.io ↗](https://crates.io/crates/pdfluent)[Python PyPI ↗](https://pypi.org/project/pdfluent/)[Node.js npm ↗](https://www.npmjs.com/package/@pdfluent/node)[WASM / JavaScript npm ↗](https://www.npmjs.com/package/@pdfluent/sdk-wasm)[.NET NuGet ↗](https://www.nuget.org/packages/PDFluent)[Java PDFluent Maven ↗](https://maven.pdfluent.com/)

[Documentation](https://pdfluent.com/docs/)[Pricing](https://pdfluent.com/sdk/pricing/)

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:

[Legacy XFA / LiveCycle forms](https://pdfluent.com/solutions/forms/#legacy-forms)

[Try the XFA flatten playground](https://pdfluent.com/playground/xfa-flatten/)

[PDFluent vs Apryse for XFA](https://pdfluent.com/comparison/vs-apryse/)

[PDFluent vs iText for XFA](https://pdfluent.com/comparison/vs-itext/)

[Migrate from Apryse](https://pdfluent.com/migrate/from-commercial/#from-apryse)

[Migrate from iText](https://pdfluent.com/migrate/from-commercial/#from-itext)

[Fix “XFA not supported”](https://pdfluent.com/errors/xfa-not-supported/)

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.

[Install it](https://pdfluent.com/docs/)[View pricing](https://pdfluent.com/sdk/pricing/)
