在ubuntu 12.04上,wkhtmltopdf不能显示格鲁吉亚字符



我用wkhtmltopdf工具生成pdf。我正在从Java执行该过程,并与OutputSteam传递html,并从过程' InputStream获得结果。在我的开发Ubuntu 14.04上一切都很好,但在Ubuntu服务器12.04上格鲁吉亚字体没有渲染,问号被渲染成这样:?????????

有没有人有一些经验,渲染中文或其他字体,英文与wkhtmltopdf?

您需要嵌入一种能够在PDF中呈现字符的字体。在样式表中添加如下内容:

@font-face {
    font-family: 'myFont';
    src: url( '/public/inc/fonts/myFont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
body {
    font-family: myFont;
}

最新更新