php - Wkhtmltopdf - 设置页脚字体的工作人员

标签 php linux wkhtmltopdf

我使用 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/

相关文章:

php - Paypal Website Payments Pro - 当前汇率?

android - 在 Android 上使用 Jsch (Exec) 时特定 unix 命令的问题

linux - Bash 控制台命令(Codeship 控制台): how to exit from current "inputs"

wkhtmltopdf - 如何避免 wkhtmltopdf 表格行内分页

php - 意外的 T_CONSTANT_ENCAPSED_STRING

javascript - 表单提交后运行脚本和php

php - CakePhp 添加标签以选择 formhelper

c# - 在 .NET 中操作 QueryString

c# - WKHTMLTOPDF 不呈现 Base64 图像

javascript - KnpLabs/snappy bundle (wkhtmltopdf) 不呈现 Chart.js 图表