I have a problem generating invoices on CiviCRM-4.6.16 with wkhtmltopdf-0.11.0_rc1 on Drupal (7.43).
In the template I define a font-family
@font-face {
font-family:LiberationSans-Regular;
src:
url(/ABSOLUTE/PATH/TO/fonts/LiberationSans-Regular.ttf);}
In the Body I define a table I want to use the font like this:
<table style = "padding-right:19px;font-family:LiberationSans-Regular;" width = "500" height = "100" border = "0" cellpadding = "2" cellspacing = "1">
The font is always ignored, except when I use a system/default font (e.g. Courier).
I tried numerous locations on where to put the fonts, since I suspected a permission problem or something like that, but apparently nothing helps and I can't get other fonts in the pdf export.
I verified that wkhtmltopdf is used (via meta data of the pdf).
Help would be appreciated!
wkhtmltopdf
make requests for font files at the locations you expect while requesting and rendering the invoice HTML? Filesystem permissions shouldn't be an issue sincewkhtmltopdf
would be requesting the files over the network, just like any other browser. So may be worthwhile confirming that this behaviour matches what you see for "normal" desktop browsers. – Chris Burgess Jan 15 '17 at 22:55wkhtmltopdf
0.11.x has/had issues resolving relative URLs in fonts? – Chris Burgess Jan 15 '17 at 23:01