pdftract/crates/pdftract-core/Cargo.toml
jedarden e2d2eded65 feat(pdftract-byq): implement direct image compositing path (Phase 5.2.1)
Implements the default-feature image rendering path for scanned PDFs:
- Walk content stream operators and collect image XObjects with CTMs
- Decode image XObjects (JPEG, RGB, grayscale, CMYK) via Phase 1.5
- Composite images onto canvas using CTM-based pixel placement
- Support page rotation (0, 90, 180, 270 degrees)
- Handle Y-flip CTMs (common in PDFs)
- Emit IMG_SOFTMASK_UNSUPPORTED diagnostic for soft-masked images

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 15:46:38 -04:00

52 lines
1.3 KiB
TOML

[package]
name = "pdftract-core"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
publish = true
[dependencies]
anyhow = { workspace = true }
hex = "0.4"
image = { version = "0.25", optional = true }
indexmap = "2.2"
flate2 = { workspace = true }
lzw = { workspace = true }
regex = "1.10"
secrecy = { workspace = true }
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }
sha2 = "0.10"
thiserror = { workspace = true }
memchr = { workspace = true }
unicode-normalization = { workspace = true }
ttf-parser = "0.24"
owned_ttf_parser = "0.21"
zstd = "0.13"
rayon = "1.10"
phf = "0.11"
[features]
default = ["serde"]
serde = ["dep:serde", "dep:serde_json"]
receipts = [] # Enable visual citation receipts (SVG clip generation)
ocr = ["dep:image"] # Enable OCR path (image compositing)
proptest = []
fuzzing = [] # Enable cfg(fuzzing) for fuzz harnesses
[dev-dependencies]
chrono = "0.4"
proptest = "1.4"
quick-xml = "0.36"
regex = "1.10"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tempfile = "3.10"
filetime = "0.2"
[build-dependencies]
phf_codegen = "0.11"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"