dongqin1819 2016-04-05 13:12
浏览 1929

WkhtmlToPdf多个字体/样式

I've read many, many topics about the hassle with multiple font-styles/faces when using wkhtmltopdf.

We are currently experiencing problems when using Nunito (provided by Google webfonts) in regular style and bold style on the same page. We have tried many (possible) solutions, but none of them has given us a solution yet.

We tried the following solutions, but no one succeeded yet:

All the above methods did not work. The browser does render it correctly, but wkhtmltopdf seems to be rendering it different.

We have published a few testcase's on: http://bannes.nl/fonts

If anyone has a suggestion on how to fix this, please let me know. In case you are using mac and have installed wkhtmltopdf, please feel free to test the cases on http://bannes.nl/fonts. I have included the output PDF for every testcase in their directory.

Hope someone has got a suggestion on how to fix this!

Best regards,

Robin

  • 写回答

3条回答 默认 最新

  • doute3621 2016-04-13 09:05
    关注
    • Use this similar utility, backed by more developers: https://github.com/plessl/wkpdf
    • if that does not work for you, check that you have the latest version of wkhtmltopdf

    If the above does not work at all, you may try a different command line utility, or a robust solution like: "LaTeX": https://www.latex-project.org/

    评论

报告相同问题?