html - helvetica font not working in wkhtmltopdf -
i have been trying use helvetica font while creating pdf font not reflected in pdf.
i did google , found solutions none workable.
tried solution 1
i found similar thing here : font issue
tried last solution mentioned on there
workaround define @font-face in css , have src link external host accessible wkhtmltopdf
but solution not working.
tried solution 2 tried use google font api, result still not workable. helvetica font
here example example of custom font
tried solution 3 tried doing using css property @page. not working.
what approach workable solution.
the easiest way fix wkhtmltopdf
's font problems base64 encode font (you can use tool) , include in css:
@font-face { font-family: 'helvetica'; src: url(data:font/truetype;charset=utf-8;base64,aaeaaaataqa... }
this works fonts (including google fonts), , guarantees cross-platform compatibility across different machines , operating systems.
Comments
Post a Comment