I have been trying to use Helvetica font while creating the pdf but the font is not reflected back in pdf.
I did some google and found some solutions but none are workable.
Tried Solution 1
I found similar thing here : Font issue
Tried the last solution mentioned over there
workaround is to define @font-face in your css and have src link to external host that is accessible by wkhtmltopdf
But the solution is not working.
Tried Solution 2 I also tried to use google font api, but result is still not workable. helvetica font
here is an example Example of custom font
Tried Solution 3 I tried doing it using css property @page. But that also is not working.
What is the approach for a workable solution.
@font-face
and linking to an external host should work as well. It's not enough to declare@font-face
though, I suspect your stylesheet doesn't actually use the font in any HTML elements. After linking to an external host, or encoding the font into the stylesheet, try setting your CSS to actually use the font on some HTML tag:body { font-family: 'Helvetica'; }
. – Goldshell