Skip to content

jasperdew/xfa-native-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,620 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDFluent SDK

Pure Rust PDF/A SDK with XFA support and WASM bindings.

Crates.io License Build

use pdfluent::Document;

let doc = Document::from_path("input.pdf")?;
for page in doc.pages() {
    println!("{}", page.text()?);
}
let pdfa = doc.convert_to_pdf_a()?;
pdfa.save("output.pdf")?;

Features

XFA Forms

  • Full XFA 3.3 support — dynamic forms with scriptable calculations
  • Font embedding pipeline — automatic resolution of embedded, system, and fallback fonts
  • Image embedding — JPEG/PNG XObjects with alpha transparency via SMask
  • Layout engine — positioned, flowed (tb/lr-tb), and table layouts with pagination
  • FormCalc interpreter — 90+ built-in functions for form calculations
  • SOM path resolutionxfa.form.subform[3].field[*] expressions

PDF Rendering

  • Pure Rust rasterizer — vello_cpu for memory-safe rendering
  • Multi-format output — PNG, JPEG, PDF (rasterized)
  • SSIM quality metrics — visual comparison against Adobe Reader ground truth

PDF/A Compliance

  • PDF/A-1a, A-2a, A-3a — ZUGFeRD/Factur-X invoice support
  • Font embedding — automatic embedding with subsetting
  • Color space normalization — OutputIntent injection
  • Metadata repair — XMP writer integration

Document Manipulation

  • Page operations — merge, split, insert, delete, rearrange
  • Encryption — AES-256 PDF 2.0 encryption/decryption
  • Content editing — find-and-replace text in content streams
  • Watermarks — text and image overlay

WASM & Bindings

  • WebAssembly — runs in browser via xfa-wasm
  • Node.js — napi-rs bindings
  • Python — PyO3 bindings (separate crate)
  • C FFI — pdf-capi for C/C++ integration

About

Pure Rust PDF/A SDK — XFA, WASM, PDF/A-1b/2b/3b, text extraction, zero dependencies

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors