我使用 Wkhtmltopdf 生成 pdf。即使使用 CSS 中 @font-face 包含的特殊字体,一切都很好。相同的方法但不影响页脚字体。甚至 --footer-font-name "Myriad Pro"或 --footer-font-size 8 都不会执行。页脚的字体始终为衬线字体并采用默认大小。
我的代码:
'/usr/local/bin/wkhtmltopdf --footer-html footer.html --footer-font-size 8 --footer-font-name "Myriad Pro" 1.html 1.pdf'
有人知道吗?
最佳答案
如果您使用 --footer-html
,所有样式(包括字体系列和字体大小)都应包含在您指定文件的 CSS 中。
--footer-font-size
和 --footer-font-name
仅与 --footer-left
一起使用,--footer-center
和 --footer right
。
关于php - Wkhtmltopdf - 设置页脚字体的工作人员,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16707400/