pdfluent 1.0.0-beta.5

Pure-Rust PDF SDK with XFA, PDF/A, digital signatures, and WASM support.
Documentation
[package]
name = "pdfluent"
version = "1.0.0-beta.5"
edition = "2021"
rust-version = "1.75"
authors = ["PDFluent Contributors <team@pdfluent.com>"]
license-file = "LICENSE"
repository = "https://github.com/pdfluent/examples"
homepage = "https://pdfluent.com"
documentation = "https://pdfluent.com/docs"
readme = "README.md"
description = "Pure-Rust PDF SDK with XFA, PDF/A, digital signatures, and WASM support."
keywords = ["pdf", "sdk", "document", "forms", "signatures"]
categories = ["text-processing", "rendering"]

[features]
default = ["signing", "pdfa", "redaction"]
async-tokio = ["dep:tokio"]

# Capability feature families (see RFC 0001 ยง10 D8)
signing = []
pdfa = ["dep:pdf-compliance"]
redaction = []
ocr-tesseract = []
ocr-paddle = []
html-to-pdf = []
docx-export = []
xlsx-export = []
pptx-export = []
xfa-flatten = []
wasm = []
internal-legacy = []
tracing = ["dep:tracing"]

[dependencies]
# Epic 2 wiring: underlying PDF crates.
# pdf-engine provides read-side (parse, page_count, text extraction, render).
# lopdf provides write-side (save, save_to, page tree operations).
# pdf-manip provides page-level operations (rotate, merge, split, extract,
# encrypt, permissions).
# pdf-sign provides PAdES signing + signature validation.
# pdf-redact provides content redaction (search + region).
pdf-engine = { path = "../pdf-engine", version = "=1.0.0-beta.6" }
lopdf = { package = "pdfluent-lopdf", path = "../lopdf", version = "=0.39.3", default-features = false }
pdf-manip = { path = "../pdf-manip", version = "=1.0.0-beta.5" }
pdf-sign = { package = "pdfluent-sign", path = "../pdf-sign", version = "=1.0.0-beta.7" }
pdf-redact = { path = "../pdf-redact", version = "=1.0.0-beta.5" }
pdf-compliance = { path = "../pdf-compliance", version = "=1.0.0-beta.7", optional = true }
tokio = { version = "1", features = ["rt", "fs"], optional = true }
tracing = { version = "0.1", optional = true }
# M6b โ€” diagnostics surface (bundle exporter, tier classifier).
serde = { workspace = true }
serde_json = { workspace = true }
sha2 = { workspace = true }

# Epic 3 #1224 parity methods โ€” native-only. `to_docx` and `to_images`
# back onto pdf-docx and pdf-render; both pull in filesystem / zip /
# vello stacks we do not compile on wasm32. On wasm32 the methods
# surface as [`Error::UnsupportedOnWasm`].
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
pdf-docx = { path = "../pdf-docx", version = "=1.0.0-beta.6" }
pdf-render = { path = "../pdf-render", version = "=1.0.0-beta.6" }
# Image encoding for `to_images` โ€” PNG via the `png` crate, JPEG via
# `image`'s JpegEncoder. Both are already transitively present via
# `pdf-render`; we pin direct versions so the `to_images` code is
# robust against transitive churn.
png = "0.17"
image = { version = "0.25", default-features = false, features = ["jpeg"] }

# WASM target: getrandom needs the `js` feature to resolve its backend on
# wasm32-unknown-unknown. pdf-sign / pdf-redact pull it in transitively
# via rand/crypto primitives. This target-specific entry unblocks
# `cargo check --target wasm32-unknown-unknown` without affecting native
# builds.
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
getrandom = { version = "0.2", features = ["js"] }

[dev-dependencies]
# Bootstrap tests run as integration tests under tests/web_examples/.
# Form-mutation integration tests (3C-1 / #1245) construct small in-memory
# PDF fixtures directly via lopdf rather than shipping binary fixtures
# for every field-type permutation.
lopdf = { package = "pdfluent-lopdf", path = "../lopdf", version = "=0.39.3", default-features = false }
criterion = { version = "0.5", default-features = false, features = ["cargo_bench_support"] }

[[bench]]
name = "facade"
harness = false

[lints.rust]
unsafe_code = "forbid"
missing_docs = "warn"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]