pdf-inspector
pdf-inspector Future and Project: Build an Auditable PDF Router
Design a local document-ingestion project with classification manifests, selective OCR, provenance, and accessible outputs.

What you will learn
- Trace detection and layout stages
- Run native extraction and OCR safely
- Design provenance checks
Before you start
- 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.
Key takeaways
- A routing manifest makes OCR decisions explainable.
- Fixtures should cover layout and failure diversity.
- Interactive visuals must not hide text evidence.
Project brief
Build a router that classifies each PDF, extracts native text when confidence is high, sends only selected pages to OCR, and emits Markdown plus a page-level evidence manifest.
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.
Decision guide
| Criterion | Option A | Option 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 |
Implementation steps
- 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.
Copy-ready example
document:
sha256: <hash>
parser_version: <semver>
pdf_type: mixed
confidence: 0.82
pages_needing_ocr: [2, 5]
output_sha256: <hash>
retention_until: 2026-10-01Frequently asked questions
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.
Sources
- pdf-inspector README (captured 2026-08-31)Source checked 2026-08-31
- pdf-inspector repositorySource checked 2026-08-31