pdf-inspector
pdf-inspector 未来与项目:构建可审计 PDF 路由器
以分类清单、页级 OCR、来源和可访问输出设计项目。

你将学会
- Trace detection and layout stages
- Run native extraction and OCR safely
- Design provenance checks
开始前需要
- Basic Git and command-line usage
- Comfort reading a project README
You can explain the project, run its documented first step, and decide what to verify before adopting it.
先看结论
- A routing manifest makes OCR decisions explainable.
- Fixtures should cover layout and failure diversity.
- Interactive visuals must not hide text evidence.
Project brief
路由器保存输入哈希、版本、类型、置信度、OCR 页、警告和输出哈希;Markdown/JSON/SVG 为规范,Three.js 只是可选探索层。
Use the pinned source evidence, record versions and assumptions, and ask a qualified reviewer to validate the result before adopting it.
Manifest and replay
Store input hash, parser version, scan strategy, PdfType, confidence, pages routed, OCR model/runtime, warnings, output hash, reviewer, and retention date. Add fixtures for mixed layouts, CJK, tables, and failures.
Accessible evolution
Markdown/JSON and local SVG remain canonical. A Three.js page graph can be an optional exploration layer, never the only way to inspect page routing or confidence.
Use the pinned source evidence, record versions and assumptions, and ask a qualified reviewer to validate the result before adopting it.
如何选择
| 比较维度 | 方案 A | 方案 B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
实施步骤
- 1
Define document, page, parser, OCR, and review fields.
- 2
Add offline corpus fixtures and parity tests.
- 3
Implement bounded routing and retention gates.
- 4
Add optional visual exploration after the text contract.
可复制示例
document:
sha256: <hash>
parser_version: <semver>
pdf_type: mixed
confidence: 0.82
pages_needing_ocr: [2, 5]
output_sha256: <hash>
retention_until: 2026-10-01常见问题
Should the manifest contain OCR credentials?
No. Store a secret-provider reference, never the credential itself.
Is Three.js necessary?
No. Add it only for useful page/route exploration while keeping Markdown and JSON canonical.
资料来源
- pdf-inspector README (captured 2026-08-31)来源核查 2026-08-31
- pdf-inspector repository来源核查 2026-08-31