TLDR Web Dev · ARTICLES & TUTORIALS

PDF TO TEXT, A CHALLENGING PROBLEM

marginalia.nu7 min read

Summary from the TLDR Web Dev newsletter

The Marginalia search engine is now indexing PDFs, a process more complex than expected. Extracting meaningful text requires parsing challenging items like rotated glyphs and dealing with a lack of semantic information. While vision-based ML is ideal, the current solution modifies PDFBox's PDFTextStripper, improving heading and paragraph identification through statistical analysis of font sizes and line spacing.