# Documentation | PDFluent

Source: https://pdfluent.com/docs/

Documentation

# Everything you need to build with PDFluent.

Guides, code examples, and API reference for PDF processing across six language channels.

Current release: SDK 1.5.0. [Changelog](https://pdfluent.com/changelog/)

Source-available on [GitHub](https://github.com/pdfluent/pdfluent-sdk)

## Pick your product

- [SDK The engine in your own code: Rust, Python, Node.js, Java,.NET and WebAssembly.](https://pdfluent.com/docs/sdk/)
- [Hosted API The same operations as a REST and MCP API, paid in prepaid credits.](https://pdfluent.com/docs/api/)
- [Editor The free desktop editor for macOS and Windows, and its guides.](https://pdfluent.com/docs/editor/)

Not sure which one? [Which product?](https://pdfluent.com/docs/choose/) compares them.

Search the SDK, hosted API and editor docs

## Per-channel get-started

- [Rust `cargo add pdfluent@1.5.1`](https://pdfluent.com/docs/rust/)
- [Python `pip install pdfluent==1.5.0`](https://pdfluent.com/docs/python/)
- [WASM / JavaScript `npm install @pdfluent/sdk-wasm`](https://pdfluent.com/docs/wasm/)
- [.NET `dotnet add package PDFluent --version 1.5.0`](https://pdfluent.com/docs/dotnet/)
- [Java `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.](https://pdfluent.com/docs/java/)
- [Node.js `npm install @pdfluent/node`](https://pdfluent.com/docs/node/)

See also [Licensing](https://pdfluent.com/docs/licensing/), [Known limitations](https://pdfluent.com/docs/known-limitations/) and the [Cookbook](https://pdfluent.com/cookbook/).

Calls enter the core and return.

## Guides and API reference

### Getting started

- [Ask which licence applies](https://pdfluent.com/sdk/pricing/)
- [Download binaries & headers](https://pdfluent.com/download/)
- [Changelog](https://pdfluent.com/changelog/)
- [Contact & support](https://pdfluent.com/contact/)

### XFA forms

- [XFA & legacy forms overview](https://pdfluent.com/solutions/forms/#legacy-forms)
- [Fill XFA form data](https://pdfluent.com/how-to/forms/#fill-xfa-form-rust)
- [Parse XFA data](https://pdfluent.com/how-to/forms/#parse-xfa-data-rust)

### Compliance

- [PDF/A validation](https://pdfluent.com/solutions/compliance/#pdf-a-validation)
- [PDF/A conversion](https://pdfluent.com/solutions/compliance/#pdf-a-conversion)
- [PDF/UA accessibility](https://pdfluent.com/solutions/compliance/#pdf-ua)
- [Long-term archiving](https://pdfluent.com/solutions/compliance/#archiving)
- [Digital signatures & PAdES](https://pdfluent.com/solutions/security/#digital-signatures)

### API by topic

- [All how-to guides (85+)](https://pdfluent.com/how-to/)
- [Text extraction](https://pdfluent.com/solutions/display/#text-extraction)
- [Rendering (PNG / JPEG)](https://pdfluent.com/solutions/display/#pdf-rendering)
- [Redaction](https://pdfluent.com/solutions/security/#pdf-redaction)
- [Encryption & permissions](https://pdfluent.com/solutions/security/#pdf-encryption)

### Deployment

- [AWS Lambda](https://pdfluent.com/how-to/deploy/#process-pdfs-aws-lambda-rust)
- [Docker](https://pdfluent.com/how-to/deploy/#process-pdfs-docker-rust)
- [WebAssembly (WASM)](https://pdfluent.com/solutions/display/#pdf-wasm)
- [Serverless PDF processing](https://pdfluent.com/solutions/scale/#serverless-pdf)
- [On-premise & air-gapped](https://pdfluent.com/solutions/security/#on-premise-pdf)

### Error reference

- [All error codes](https://pdfluent.com/errors/)
- [PDF encrypted error](https://pdfluent.com/errors/pdf-encrypted-error/)
- [Invalid PDF error](https://pdfluent.com/errors/invalid-pdf-error/)
- [PDF/A validation error](https://pdfluent.com/errors/pdfa-validation-error/)
- [Out of memory error](https://pdfluent.com/errors/out-of-memory-error/)
- [XFA not supported](https://pdfluent.com/errors/xfa-not-supported/)

## Quick examples

Common operations to get started

### Initialise & extract text

Rust

```
use pdfluent::PdfDocument;

let doc = PdfDocument::open("invoice.pdf")?;

// The full text, in reading order.
let text = doc.extract_text()?;
println!("{text}");

// Or per page.
for n in 0..doc.page_count() {
    println!("--- page {} ---", n + 1);
    println!("{}", doc.page(n)?.text()?);
}
```

### Flatten XFA form

Rust

```
use pdfluent::PdfDocument;

let mut doc = PdfDocument::open("tax_return.pdf")?;

// The form model: one row per logical field.
let model = doc.xfa_form_model()?;
for field in &model.fields {
    println!("{} = {:?}", field.name, field.value);
}

// Fill by name.
doc.set_xfa_field_value("form1.name", pdfluent::xfa::XfaFieldValue::Text("Smith"))?;
```

### Convert & validate PDF/A

Rust

```
use pdfluent::{PdfAProfile, PdfDocument};

let doc = PdfDocument::open("legacy.pdf")?;

let report = doc.validate_pdfa(PdfAProfile::A2b)?;
if report.is_compliant() {
    println!("conforms to PDF/A-2b");
} else {
    for violation in &report.violations {
        println!("{violation:?}");
    }
}
```

### Sign a document (PAdES)

Rust

```
use pdfluent::signer::{PadesProfile, Pkcs12Signer, SignOptions};
use pdfluent::PdfDocument;

let mut doc = PdfDocument::open("contract.pdf")?;
let signer = Pkcs12Signer::from_pfx_file("cert.p12", "password")?;

// SignOptions::new() is PAdES B-B. For B-T or B-LT, use
// doc.sign_timestamped(..), which signs and then hands your timestamp
// authority the signature to stamp.
let opts = SignOptions::new()
    .profile(PadesProfile::BasicSignature)
    .reason("Approved");

doc.sign(&signer, opts)?;
doc.save("contract-signed.pdf")?;
```

### How-to guides

85+ step-by-step guides covering every PDF operation in Rust — merging, signing, OCR, PDF/A, XFA, and more.

Browse all guides →

### Error reference

Error codes with explanations, root causes, and fixes. Covers common issues in iText, PDFBox, IronPDF migrations too.

Browse errors →
