Why Standard PDF Converters Break on Tables
The PDF specification (ISO 32000-1) was engineered for visual print fidelity, not semantic data storage. A table in a PDF consists of disjointed string drawing operators (Tj / TJ) alongside coordinate transform matrices (Tm) and optional vector line paths (re, m, l).
Because text glyphs are written in non-chronological order inside the binary stream, a standard OCR or text extraction script dumps cells in random sequence. A multi-column financial statement quickly becomes a jumbled wall of numbers.
Best Practices for Converting Complex Financial & Scientific Tables
- Multi-line Cell Wrapping: Ensure multi-line table headers are merged into a single cell with HTML break tags (
<br>) so markdown pipe syntax remains on a single line. - Negative Financial Numbers: Parenthetical notations like
(1,240)are preserved accurately without being dropped by regex filters. - Footnotes in Tables: Superscript references (e.g.,
[1]) are retained and placed below the table as linked CommonMark footnotes.