Why does the report PDF show a different font on another computer?
· Toni Martir, arquitecto de software
A PDF can either carry the fonts it was written with or just name them. If it only names them and the computer opening it lacks them, that computer uses others, and the invoice statement that looked perfect at the office reaches the customer in a different typeface.
In Report Manager the fix is to produce the report as PDF/A-3: it carries all of its fonts and looks the same on any computer. The classic PDF 1.4 only travels as well if it is written in the PDF standard fonts, which hold Latin characters only; its advantage is size, which can stay under 10 KB.
The same invoice, as PDF 1.4 and as PDF/A-3
Measured with Report Manager's sample invoice, four pages, generated with printreptopdf 4.0.16 on Linux. As PDF/A-3 it carried DejaVu Sans regular and bold, which take up 760 and 709 KB on disk: only the letters of the invoices travelled.
If the font is not inside, it gets replaced
The PDF standard, ISO 32000-1, allows the font to be stored in the file. If it is not, the PDF stores its measurements so that the program opening it can «synthesize a substitute font or select a similar font». According to Adobe, the substitute stretches or condenses so that lines and pages break in the same places, but the letter shapes do not always match, and text in some languages comes out as a row of bullets.
PDF 1.4: tiny, with the standard fonts
The standard defines 14 standard fonts, variants of Helvetica, Times and Courier plus two symbol fonts, which every program that reads PDF must have, or have their measurements and suitable substitutes. They need no embedding, which is why the file is so small: the sample invoice, four pages, comes to 9 KB. It is the choice when size matters.
The catch is the characters. Helvetica, Times and Courier hold Adobe's standard Latin character set, which the standard lists in its Annex D: enough for all of English or Spanish, accents, ñ and euro sign included, but not for Cyrillic, Arabic or Chinese. In PDF 1.4, any other font is either embedded text by text or only linked, and then a computer that lacks it uses another.
PDF/A-3: every font inside
PDF/A-3 is part 3 of the ISO 19005 standard. Its clause 6.2.11.4.1, as quoted by the PDF/A validator veraPDF, requires every font used to draw the text to be embedded. And an embedded font is not replaced: whoever opens the PDF sees the text «in its original font», as Adobe puts it.
Report Manager has produced PDF/A-3 since version 3.7.5, released in December 2024: in the report's page setup, the «PDF A/3» option. The engine then embeds every font, including those the report had as standard, and for an ordinary font only the letters it uses, on Windows and on Linux. The same invoice comes to 71 KB. The option is saved in the report, so the PDF comes out the same from the designer, from printreptopdf or from the web report server.
Windows fonts can be embedded in a document: Microsoft's font FAQ allows it as «a special case», provided the program follows the rules of the font formats. What is forbidden is copying them onto a server, as I explained in the piece on the report that comes out misaligned on a Linux server.
So why does the lettering change?
Because the PDF only names the font and the computer opening it does not have it. With PDF/A-3, Report Manager embeds every font and the report looks the same on any computer; PDF 1.4 with standard fonts is for when size matters more than characters.
Sources
- ISO 32000-1:2008, the PDF standard, in the copy published by Adobe: section 9.8.1, «These font metrics provide information that enables a conforming reader to synthesize a substitute font or select a similar font when the font program is unavailable.»; section 9.6.2.2, «The PostScript names of 14 Type 1 fonts, known as the standard 14 fonts, are as follows: Times-Roman, Helvetica, Courier, Symbol, Times-Bold, Helvetica-Bold, Courier-Bold, ZapfDingbats, Times-Italic, Helvetica-Oblique, Courier-Oblique, Times-BoldItalic, Helvetica-BoldOblique, Courier-BoldOblique» and «These fonts, or their font metrics and suitable substitution fonts, shall be available to the conforming reader.»; Annex D.1, «D.2, "Latin Character Set and Encodings", describes the entire character set for the Adobe standard Latin-text fonts. This character set shall be supported by the Times, Helvetica, and Courier font families»; table D.2 includes the accented vowels, Ñ, ñ, Ç, ç and the euro sign.
- Adobe, Font embedding and substitution in PDFs with Distiller: «When you embed fonts, you prevent font substitution, ensuring readers see the text in its original font.»; «The substitution fonts can stretch or condense to fit, maintaining line and page breaks from the original document.»; «The substitution cannot always match the shape of the original characters, especially with unconventional typefaces like scripts.»; «Fonts from some languages or with unknown encodings cannot be substituted. In such cases, the text appears as bullets in the file.»
- veraPDF, PDF/A-2 and PDF/A-3 rules, rule 6.2.11.4.1-1, specifications ISO 19005-2:2011 and ISO 19005-3:2012: «The font programs for all fonts used for rendering within a conforming file shall be embedded within that file, as defined in ISO 32000-1:2008, 9.9.»
- Microsoft, Font redistribution FAQ, «Document embedding» section: «Although the redistribution of fonts supplied with Windows is generally not allowed, “document font embedding” is a special case which is allowed in some circumstances.», «If an application follows the rules and restrictions defined in the OpenType or TrueType specification, you can use it to embed Windows supplied fonts in any document file it creates.» and «You may not copy them to other computers or servers».
- Report Manager: what is new in version 3.7.5, «Version 3.7.5 include this new features December 2024 PDF/A3 conformance at page setup»; PDF output, «The engine is faster and the file is smaller if you use standard Type 1 fonts (Courier/Times/Helvetica)» and «You can use TrueType font linking if you know the destination computers have the font installed.»; installing on Linux, «libharfbuzz-subset0 (the PDF embeds only the characters used from each font)».
- My own measurement, 1 November 2026: Report Manager's sample invoice report
(
samples/invoices.rep, four one-page invoices) generated with printreptopdf 4.0.16 on Linux takes 9,386 bytes as PDF 1.4, with no font embedded, and 70,864 bytes with the PDF A/3 option, with DejaVu Sans and DejaVu Sans Bold embedded as subsets.
Toni Martir, arquitecto de software · · sources checked on