Why a PDF's Layout Sometimes Shifts After Conversion (and How to Avoid It)

By Shahid Iqbal · Published

It's almost never a bug. In the overwhelming majority of cases it comes down to one specific, well-understood cause: font substitution.

The layout isn't stored as fixed positions -- it's calculated from the font

A Word or PowerPoint file doesn't store where every letter sits on the page. It stores the text and which font it's set in, and the software calculates line breaks and spacing at render time based on that specific font's actual letter widths.

PDF, by contrast, is a fixed-layout format -- once converted, every letter's position is locked in. That conversion step is exactly where a font mismatch becomes visible.

What happens when the exact font isn't available

Common commercial fonts like Calibri or Cambria are licensed by Microsoft and aren't necessarily installed on the server performing the conversion. Our Office-to-PDF conversions run through LibreOffice, which substitutes a metrically-compatible alternative when the exact font is missing -- Carlito in place of Calibri, Caladea in place of Cambria. These substitutes are specifically engineered to match the original font's character widths, so line breaks and page counts stay the same.

What can still shift very slightly is the exact letterform (the visual shape of each character) and, in edge cases, spacing that depends on more than raw character width, such as kerning pairs unique to the original font.

How to avoid it entirely

Stick to fonts that are genuinely cross-platform and open-licensed if layout precision matters -- Arial, Times New Roman, and the Carlito/Caladea/Liberation family all convert with no substitution needed, because they're already what gets used.

If you must use a commercial font and need pixel-perfect fidelity, flatten the text to outlines or images in the original program before converting -- this preserves the exact look at the cost of making the text unselectable.

For everyday documents, a font substitution is rarely noticeable and the line breaks stay correct. It's mainly worth planning around for heavily designed documents, like flyers or resumes, with tight, deliberate line breaks.

Related tools