pdf-inspector
pdf-inspector: análisis desde PDF hasta evidencia Markdown
Fixtures para detector, fuentes, layout, tablas y bindings.

Qué aprenderás
- Trace detection and layout stages
- Run native extraction and OCR safely
- Design provenance checks
Antes de empezar
- 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.
Conclusiones clave
- Fixtures reveal intermediate contracts.
- Font and layout edge cases deserve focused tests.
- OCR integration should stay optional in unit tests.
Read from public contracts
Usa PDFs pequeños de columnas, CID, tablas, enlaces e imágenes para verificar PdfType, items, rectángulos, warnings y paridad.
Use the pinned source evidence, record versions and assumptions, and ask a qualified reviewer to validate the result before adopting it.
Follow a fixture
Use synthetic PDFs covering columns, CID fonts, tables, links, page numbers, and image pages. Compare TextItems, PdfRects, PdfType, Markdown, and warnings at each stage.
Contribute safely
Add parser fixtures, encoding regressions, table edge cases, page-selection tests, and JSON schema checks without requiring PDFium, ONNX, or network access.
Use the pinned source evidence, record versions and assumptions, and ask a qualified reviewer to validate the result before adopting it.
Cómo elegir
| Criterio | Opción A | Opción 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 |
Pasos de implementación
- 1
Pin source and inspect public APIs.
- 2
Create tiny PDFs for each edge case.
- 3
Trace intermediate types and warnings.
- 4
Add a deterministic regression.
Ejemplo para copiar
fixture PDF -> detector -> PdfType/pages
-> TextItem/PdfRect -> layout/tables
-> Markdown/JSON -> binding parityPreguntas frecuentes
Can benchmark output prove internal call paths?
No. Use source symbols, fixtures, and tests to verify implementation details.
How do I test OCR without large runtimes?
Mock the routing boundary and validate the versioned envelope; run end-to-end OCR separately.
Fuentes
- pdf-inspector README (captured 2026-08-31)Fuente verificada 2026-08-31
- pdf-inspector repositoryFuente verificada 2026-08-31