Solutions

Convert PDFs to archival PDF/A format.

Turn ordinary PDFs into ISO-compliant PDF/A-1b, PDF/A-2b, or PDF/A-3b files for long-term archiving. Embed fonts, fix color profiles, and attach files automatically.

Code example

rust
use pdfluent::{Document, compliance::PdfALevel};

fn convert_to_archival(input: &str, output: &str) -> anyhow::Result<()> {
    let mut doc = Document::open(input)?;

    // Convert to PDF/A-2b — auto-embeds fonts and attaches sRGB color profile
    let report = doc.convert_to_pdf_a(PdfALevel::A2b)?;

    if !report.warnings().is_empty() {
        for w in report.warnings() {
            eprintln!("Warning: {}", w);
        }
    }

    doc.save(output)?;
    println!("Saved PDF/A-2b to {output}");
    Ok(())
}

Run cargo add pdfluent to get started.

What it does

PDF/A-1b, PDF/A-2b, PDF/A-3b output

Choose the archival level that matches your requirement. PDF/A-1b for maximum compatibility. PDF/A-2b for JPEG 2000 compression and optional content. PDF/A-3b for embedded attachments such as XML invoices.

Automatic font embedding

PDFluent detects partially-embedded or unembedded fonts and embeds the full font program from the system font registry. Documents with missing fonts produce a warning so you can take action when automatic substitution is not possible.

Color profile handling

RGB and CMYK color spaces are tagged with ICC output intents. An sRGB profile is attached by default for RGB documents. You can supply a custom ICC profile for print or brand-critical workflows.

XMP metadata generation

PDF/A requires compliant XMP metadata with pdfaid:conformance and pdfaid:part. PDFluent writes correct XMP automatically and preserves existing Dublin Core metadata when present.

ZUGFeRD and Factur-X compatible

Electronic invoicing standards ZUGFeRD 2.x and Factur-X require PDF/A-3b with an embedded XML attachment. PDFluent produces the correct AFRelationship and MIME-type entries needed by invoice validators.

Conversion quality report

Every conversion returns a typed report listing auto-fixed issues, warnings for items that required approximation, and errors for any clause that could not be satisfied. Use it to decide whether to accept or reject output.

Deployment options

Rust library (crate)CLI converterREST microserviceAWS LambdaDocker containerBatch pipeline (Rayon)

Frequently asked questions