问题描述
我们使用wkhtmltopdf从HTML页面呈现PDF,但是像Verdana和Georgia这样的字体显示不正确。我们使用说明在我们的服务器上安装了TrueType字体。使用样式标签内嵌字体:style =font-family:verdana,geneva;
任何有关我们可以尝试下一步尝试获取这些字体的建议我们将不胜感激。
试试Arman H.的解决方案发布在这个问题上:
Base64将字体编码到您的CSS中,对我们来说就像一个魅力。
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.
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.
这篇关于Wkhtmltopdf不显示TrueType字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!