ERPNext Conference 2019* Blog

PDF output font remains default


I changed the font it applies changes when I print the doc but it does not if I view it as PDF, tried all possible solutions found here in both v11 and v12 still no solution found.


Could you share your current configuration (what type of print format, the css snippet for the font, where is the font file located, …)? Otherwise, we can just guess…


I have not added anything new everything is default, but the default font we see in view and the same default font we get in pdf is different, also if I change font, the builtin ones I still get that weird font in pdf. I have not added anything custom css or my own font.


Could you share a screenshot of the preview and the pdf? Most probably a font is missing on the server, do you have cups installed?


what is cups?


Print view

PDF view


If I change font print view show changes but pdf still shows in this above font


Cups is a package for Linux that provides print drivers and font packages.

$ sudo apt install cups

How do you change the font? Considering that the preview is rendered by your browser and the pdf by wkhtmltopdf, the above changes are normals AFAIK. But if I understand you correctly, the difference is only after the change in font, correct?


I think there is something wrong in the custom print format you’re using.
If you’re using custom print then can you share the script?


How do I make everyone believe me I literally have not done any custom changes, I have not changed the font, I am telling that even if I change the font or not I only get that specific font in pdf. Even default font doesn’t remain same in pdf


Oh Ok So your saying that even with the default standard Print format it is acting like this, where print view is showing different while PDF is showing different.

Maybe need to check the css elements on print view to see what is shows as print view. But I dont think anyone else have reported this issue earlier, Can you try a different browser or a different machine to check if it is behaving the same way ?


This problem is everywhere, I have searched but none had a solution. I have tried on every browser same issue.