Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wkhtmltopdf not displaying TrueType fonts

We're using wkhtmltopdf to render a PDF from an HTML page however fonts such as Verdana and Georgia aren't being displayed properly. We installed the TrueType fonts on our server using these instructions. Fonts are being set inline using style tags: style="font-family: verdana, geneva;"

Any suggestions on what we can try next to get these fonts to display would be appreciated.

like image 553
ahk Avatar asked Oct 05 '22 06:10

ahk


1 Answers

Try Arman H.'s solution posted over on this question: Google Web Fonts and PDF generation from HTML with wkhtmltopdf

Base64 encoding the fonts into your css has worked like a charm for us.

like image 80
Yardboy Avatar answered Oct 10 '22 03:10

Yardboy