ERPNext Conference 2019* ERPNext.com Blog

Change font of Pdf


#1

What are the necessary steps that needs to be followed to change the font of Pdf?
I had already run the following command-
sudo apt-get install ttf-mscorefonts-installer
But still the issue remains unsolved.


#3

You can download a font as woff to your public folder and then use a CSS snippet like this in your print format:

@font-face {
   font-family: myTimes;
   src: url('/files/times.woff');
}
.print-format {
   font-family: myTimes;
}

Hope this helps :wink:


#4

Hello @lasalesi,

You have to tried changed css and used print-format .

Thanks


#5

Goto /usr/local/share/fonts
Paste .ttf file
Then run following command:
sudo chown root CenturyGothic.ttf
fc-cache


#6

Font change is reflecting everywhere including the print preview but not in the Pdf.
Any solution to this issue?


#7

did you find solution?


#8

Hi @teamcodez,

have you checked if the font file is accessible from the server (i.e. wkhtmltopdf)?