Font style not applying in PDF

In the print format preview, the applied font (Times New Roman) is showing correctly, but in the generated PDF it switches to the default font. Please check why the custom font is not being applied in PDF output.

Most of the print format styles are correctly shown preview but it changes in generated PDF. This is because wkhtmltopdf tool used to generate the PDF. So if the font is changing in PDF, then most probably the font is not available in wkhtmltopdf and that’s why rendering is failing. You can try adding fonts using below command.
sudo apt install ttf-mscorefonts-installer -y
If you get a license prompt (EULA), press Tab and Enter to accept.
sudo fc-cache -fv
After this fonts will render in PDF.

1 Like