我正在使用 wkhtmltopdf 将 html 转换为 pdf。
我想在每个页面中添加标题,但它只显示在第一页(目录)中。
我使用的命令是 "C:\Program Files\wkhtmltopdf\wkhtmltopdf.exe" toc --xsl-style-sheet default.xsl --header-html header.html http://a-url-to-a-page.com "some\folder\outputs\output-%time:~0,2%-%time:~3,2%-%time:~6,2%.pdf"
有任何想法吗?
最佳答案
(由 OP 解决并由问题编辑回答。在此处转录为社区 wiki 答案 - 尽管它有点简洁。参见 Question with no answers, but issue solved in the comments (or extended in chat))
OP写道:
Finally solved, the problem was that
--header-html
should come before the table of contents related stuff...
@Nenotlep 写道:
wkhtmltopdf
is particular about the order of arguments given.
关于每页上的 wkhtmltopdf 标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10583272/