PDF Reflow Explained: What Happens When Your Edited Text Gets Longer
PDFs have no built in text flow: every line is placed at a fixed position. When an edit makes text longer, MythosPDF rewraps the paragraph using exact font metrics, moves only the content below it down by the extra height, and, if the page overflows, continues on a new page inserted right after it.
Why PDFs don't reflow on their own
In a word processor, text flows: add a word and everything after it shifts. A PDF has no such concept. Each line is drawn at an absolute position, so if your new sentence is longer than the old one, a naive editor either lets it run off the edge, squashes it, or overlaps the next line.
How MythosPDF reflows, step by step
- 1Rebuild the paragraph. The engine reconstructs which lines belong together: wrapped lines, hanging bullet indents, alignment and line spacing.
- 2Rewrap with real metrics. Your new text is broken into lines using exact glyph widths in the original font, respecting the paragraph's width and indent.
- 3Move only what's below. If the paragraph grew by one line, content directly beneath it in the same column moves down by one line height, and rules and table rows move with it.
- 4Leave everything else frozen. Other columns, sidebars, headers, images and footers don't move at all.
- 5Continue on a new page if needed. If content would run off the bottom, the overflow continues on a continuation page inserted right after the current one.
Shorter text works too
Delete a sentence and the paragraph rewraps tighter. MythosPDF keeps the rest of the page stable rather than yanking everything up, so a small deletion doesn't redesign your document.
Curious about the principles behind this? Read what is a zero mutation PDF editor, or just try an edit.