Merge CMap and Differences encoding at the byte level for single-byte fonts, fixing garbled output when partial ToUnicode CMaps caused Latin-1 fallback to block the Differences path. Add Adobe-Korea1 CID-to-Unicode predefined mapping for Identity-H CID fonts without ToUnicode streams, and support TrueType cmap extraction via ttf-parser for embedded fonts. Also handle suffixed glyph names (e.g. zero.tf, a.ss01) per Adobe spec. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
51 lines
948 B
TOML
51 lines
948 B
TOML
[package]
|
|
name = "pdf-inspector"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
autobins = false
|
|
authors = ["Firecrawl Team"]
|
|
description = "Fast PDF inspection, classification, and text extraction with smart scanned vs text-based detection"
|
|
license = "MIT"
|
|
repository = "https://github.com/firecrawl/pdf-inspector"
|
|
|
|
[dependencies]
|
|
# PDF parsing
|
|
lopdf = { git = "https://github.com/J-F-Liu/lopdf", rev = "0387137b90d54418db02ccc0b406ed6a5883da0d", features = ["rayon"] }
|
|
|
|
# Error handling
|
|
thiserror = "2.0"
|
|
|
|
# Parallel processing
|
|
rayon = "1.10"
|
|
|
|
# Logging
|
|
log = "0.4"
|
|
env_logger = "0.11"
|
|
|
|
# Text processing
|
|
regex = "1.10"
|
|
once_cell = "1.19"
|
|
|
|
# TrueType font parsing (for Identity-H CID font cmap extraction)
|
|
ttf-parser = "0.25"
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3.3"
|
|
|
|
[features]
|
|
default = []
|
|
|
|
[[bin]]
|
|
name = "pdf2md"
|
|
path = "src/bin/pdf2md.rs"
|
|
|
|
[[bin]]
|
|
name = "detect-pdf"
|
|
path = "src/bin/detect_pdf.rs"
|
|
|
|
[[bin]]
|
|
name = "dump_ops"
|
|
path = "src/bin/dump_ops.rs"
|
|
|
|
|