Solutions

Redact it right. Not just visually.

True PDF redaction that permanently removes content from the content stream — not just the visible layer.

Code example

rust
use pdfluent::{Sdk, redaction::{RedactionOptions, RedactionPattern}};

let sdk = Sdk::init_with_license("license.json")?;
let doc = sdk.open("contract.pdf")?;

let patterns = vec![
    RedactionPattern::regex(r"\d{9}")          // Dutch BSN
        .with_replacement("[BSN REDACTED]"),
    RedactionPattern::regex(r"account-nr: \d+")
        .with_replacement("account-nr: [REDACTED]"),
    RedactionPattern::metadata_key("Author")
        .with_replacement("[REDACTED]"),
];

let opts = RedactionOptions::builder()
    .patterns(patterns)
    .remove_embedded_images(true)
    .strip_metadata(true)
    .generate_report(true)
    .build();

let redacted = doc.redact(opts)?;
redacted.save("contract_redacted.pdf")?;

let report = redacted.redaction_report();
println!("Removed {} items", report.redacted_count());

Run cargo add pdfluent@1.0.0-beta.5 to get started.

What it does

True content removal

Redaction burns through to the content stream. Text, images, and metadata are permanently removed — not just visually hidden.

No metadata leakage

Strips author, creator, modification date, and PDF comments. XMP metadata, embedded files, and thumbnail images are fully removed.

Visual verification

Preview redactions before applying. Overlay shows exactly what will be removed, including content in hidden layers.

Pattern-based redaction

Define regex patterns for account numbers, SSNs, emails, or custom formats. Batch-apply across thousands of documents.

Audit trail

Generate a redaction report listing all removed content, page numbers, and redaction reasons for compliance.

usan only visible layer

Some tools only redact the visible layer. PDFluent operates on the content stream — embedded images and hidden text are caught.

Deployment options

Server-side (Rust binary)Docker containerAWS LambdaOn-premise

Frequently asked questions