PDF to Word: whole words in PDFs without space glyphs #3
Reference in New Issue
Block a user
Delete Branch "fix/word-spaces"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while making the Day 2 Word file on the installed app: a real PDF (WPS Writer; no space glyphs, each glyph its own
Tj, words split over text objects) came out as "Dichotomou s Image Segmentat ion", "evalu ati on", and "Terms ofUse".Cause
lines()kept them.Fix
Tests
word.rsunit tests: the exact characters pdfium gave for the real file; real space glyphs (incl. a narrow one); 0.14 em justified gaps; a heading tracked to 0.15 em.tests/word.rs: a PDF with no space glyphs, words split over text objects, Td-moved pieces and the WPS layout (flipped Tm, a Tj per glyph).Self-review
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.