Skip to main content

Robust Typography

One of PDF’s greatest advantages is that its visual presentation is robust; unlike other formats, text will never reflow unexpectedly, as it is written to the file line-by-line. Even if fonts are missing, PDF will synthesize an alternative font whose metrics match the original, ensuring that the text fits in its allocated space, and line and page breaks are preserved.

The source formats used by todays applications, however, do not store text line-by-line. Text is typically placed into predetermined areas, known as frames, and reflow is carried out (the character positions are calculated) at runtime. Theoretically, if all fonts are present, all line and page breaks should remain the same and the document’s presentation should not change. But in practice, moving to a different system or software version is often enough to cause minor changes in the way text is set. All it takes is a single rounding error to result in some text being wrapped to the next line, causing rippling changes throughout the rest of the document.

For the above reasons, hybrid PDF (PDF with embedded source files) also suffers from the same problems if the document is opened on another system for editing.

Editable PDF preserves the PDF’s robustness during editing via the following techniques:

  • First, edits are non-destructive: text retains its saved position until it is edited, and it is up to the application to recalculate the line breaks of edited paragraphs in a conservative way
  • If fonts are missing (e.g. due to licensing issues), the font synthesis functionality of PDF can be used to enable editing using a substitute font whose character widths (metrics) match the original. This way, the text will appear correctly when the font becomes available again.

Leave a Reply

Your email address will not be published. Required fields are marked *