662 B
662 B
Multi-column layout reading order
Why deferred
Many Text PDFs are single-column policies. Multi-column (or sidebar) layouts can make naive top-to-bottom extraction interleave columns.
Trigger
Chunk Preview shows sentences from column A mixed with column B; Experiment Faithfulness drops on those docs only.
Approach to try
- Use PyMuPDF block/bbox clustering to detect columns
- Read column-by-column (right-to-left for Farsi multi-column if applicable)
- Add a fixture PDF with known two-column layout to regression tests
Success criteria
- Reading order matches human reading on the fixture
- No regression on single-column Farsi docs