Hi Owen,
The PDF Document Generation module uses a headless Chromium browser to render the page, so custom fonts should be loaded and applied correctly in the browser before the PDF is generated.
Since the fonts display correctly in the application but not in the generated PDF, I would check the following:
.ttf, .woff, or .woff2 files are served from your application and are accessible to the Document Generation service. Avoid relying on local file paths or external font URLs that may not be accessible from the rendering environment.@font-face configuration: Confirm that the font family name used in your CSS matches the name declared in @font-face, and that the correct font file and weight are configured.
@font-face {
font-family: 'ImpactCustom';
src: url('/fonts/impact.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.impact-custom {
font-family: 'ImpactCustom', sans-serif;
}
Mendix's official documentation also recommends placing custom font files in theme/web/fonts, declaring them using @font-face in main.scss, and applying the corresponding CSS class to the text and widgets.
Reference: PDF Document Generation — Applying Custom Fonts
If the font loads successfully in the browser but still falls back in the generated PDF, please share the @font-face declaration and the font file format. That will help narrow down whether this is a font-loading issue or a rendering-specific issue.
Hope this helps.