Solutions

Automate PDF generation and processing at scale.

Generate thousands of invoices, process incoming PDFs, fill forms, add watermarks, and run PDF pipelines in CI/CD — all from a single Rust binary with no external dependencies.

Code example

rust
use pdfluent::{PdfDocument, WatermarkOptions};

fn main() -> pdfluent::Result<()> {
    let mut doc = PdfDocument::open("template.pdf")?;

    doc.form_mut()
        .set_text("customer_name", "ACME Corp")?
        .set_text("date", "2026-01-15")?;

    doc.add_watermark("PROCESSED", WatermarkOptions::centered().opacity(0.15))?;
    doc.save("filled.pdf")?;
    Ok(())
}

Run cargo add [email protected] to get started.

What it does

Parallel batch processing

PDFluent integrates with Rayon for data-parallel processing. Document types are Send + Sync. Distribute work across all available CPU cores without any shared mutable state or locking.

Pipeline composition

Chain operations — merge, fill, watermark, sign, compress, validate — in a typed pipeline. Each step receives a Document and returns a Document. Compose steps at runtime from configuration without recompiling.

Idempotent operations

Operations like watermarking and form-filling are designed to be idempotent: running them twice on the same document produces the same result. This simplifies retry logic and makes pipelines safe to replay after failures.

Template-based generation

Define a PDF template with fillable fields, then drive generation from a data source — a CSV, database query, or API response. PDFluent stamps data into each document and saves it without rendering to intermediate formats.

Error recovery and partial results

Use Rayon's collect-errors pattern to process an entire directory and collect all errors without short-circuiting. Inspect which documents failed and why, then replay only the failed subset.

CI/CD and pipeline integration

PDFluent compiles to a single static binary with no runtime dependencies. Drop it into any Docker image, GitHub Actions runner, or Lambda function. Use exit codes and stdout/stderr for standard pipeline integration.

Deployment options

CLI batch toolRust library (crate)AWS LambdaDocker containerGitHub Actions / GitLab CIKubernetes JobFly.io / Railway

Frequently asked questions