Wkhtmltopdf 不显示 TrueType 字体

ahk*_*ahk 6 php fonts wkhtmltopdf

我们使用 wkhtmltopdf 从 HTML 页面呈现 PDF,但 Verdana 和 Georgia 等字体无法正确显示。我们按照这些说明在我们的服务器上安装了 TrueType 字体。使用样式标签内联设置字体:style =“font-family:verdana,geneva;”

对于我们接下来可以尝试如何显示这些字体的任何建议,我们将不胜感激。

Rac*_*len 0

你的CSS中的字体设置正确了吗?

例如

@font-face {
 font-family: 'Verdana';
 src: url('verdana-webfont.eot');
 src: url('verdana-webfont.eot?#iefix') format('embedded-opentype'),
 url('verdana-webfont.woff') format('woff'),
 url('verdana-webfont.ttf') format('truetype'),
 url('verdana-webfont.svg#Verdana') format('svg');
 font-weight: normal;
 font-style: normal;
 }
Run Code Online (Sandbox Code Playgroud)