pdftotext -bbox-layout splits small caps, section numbers and captions in ways a parser must undo
FactVerified 28 Sep 2026Holds anywhere
Fact. A statement and the evidence for it.
Statement#
Word boxes from Poppler's pdftotext -bbox-layout break text that looks whole on the page:
- Small capitals split a word in two with almost no gap: an IEEE heading
I. INTRODUCTIONcomes out as the wordsI.,IandNTRODUCTION, with a gap of about 0.5 pt (0.05 of the word height) betweenIandNTRODUCTION. Join words whose gap is under about 0.15 of the word height. - LaTeX sets a section number a quad before its title, and Poppler puts the number (
1,1.1) in a block of its own. In plainpdftotexttext the number is on its own line, sometimes with a blank line before the title. Attach a lone number to the line on the same baseline to its right. - One caption, or one justified paragraph, can arrive as several blocks, and the next line in reading order can be in the other column. Find a continuation line by position (just below and overlapping), not by reading order.
- Some caption fonts report word boxes much shorter than other words (about 4 pt tall where body words are about 8 pt). Measure gaps in the page's median word height, not the caption's own height.
- Axis tick labels and legend lines inside a vector plot are ordinary words, and a row of ticks can have 6 or more words. Require prose lines to be wide (about a third of the text width) and to average several characters per word.
Evidence#
rait, 2026-09-27 (Poppler 26.09): seen while writing heading detection (rait pdf outline --headings) and figure cropping on 12 arXiv papers and a two-column ACM paper; each rule above fixed a measured miss.