[pdf] PDF to Word: spaces from letter gaps, not pdfium's invented whitespace (whole words in PDFs without space glyphs)

This commit is contained in:
2026-11-17 03:08:37 +01:00
parent 47576bd6e0
commit 45f1d40c5b
3 changed files with 201 additions and 12 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ page as displayed (the crop box, `/Rotate` applied). `geometry::PageFrame` conve
| password off | lopdf decrypting load + plain save | |
| true redaction | pdfium render + lopdf rebuild (below) | |
| compress presets (Day 2) | lopdf: images capped at the largest page side × the preset's dpi and re-encoded as JPEG (E-mail 120 → 96 → 72 dpi until ≤ 5 MB, Web 150, Print 300); Flate everywhere; object streams | text, fonts and vectors untouched, so text stays extractable; fonts are not subset (gap) |
| PDF to Word (Day 2) | pdfium characters (box, size, weight, slant) → lines, segments, tables, paragraphs, headings; images at their place; docx-rs writes the .docx | "Layout is approximate"; scanned pages are reported, and OCR text from Fundamentum's Lector can be passed in |
| PDF to Word (Day 2) | pdfium characters (box, size, weight, slant) → lines, segments, tables, paragraphs, headings; images at their place; docx-rs writes the .docx | "Layout is approximate"; spaces come from the gaps between letters (measured against the line's own letter spacing), never from pdfium's invented whitespace, so PDFs without space glyphs keep whole words; glyphs without a Unicode mapping stay U+FFFD; scanned pages are reported, and OCR text from Fundamentum's Lector can be passed in |
### True redaction