wkhtmltopdf 因 --footer-center 参数而失败 [英] wkhtmltopdf fails with --footer-center argument
本文介绍了wkhtmltopdf 因 --footer-center 参数而失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 wkhtmltopdf 将文本插入页脚.
Im trying to insert text into the footer with wkhtmltopdf.
wkhtmltopdf ../input.html ../output.pdf --footer-center="My Text"
但它只是给了我错误
Unknown long argument --footer-center=My Text
我试过很多方法
wkhtmltopdf ../input.html ../output.pdf --footer-center=My Text
wkhtmltopdf --footer-center="My Text" ../input.html ../output.pdf
wkhtmltopdf ../input.html --footer-center="My Text" ../output.pdf
但所有结果都在
Unknown long argument --footer-center=My Text
我正在使用 wkhtmltopdf 0.12.1(带有补丁的 qt)
和 man wkhtmltopdf
描述了 --footer-center
参数
当然 input.html 已经存在于父目录中,如果我不添加 --footer-center 参数,一切正常
And of course input.html already exists in the parent directory, and everything works perfect if I dont add the --footer-center argument
推荐答案
参数值必须用 (空格)分隔,而不是
=
.
Instead of =
the parameter value has to be separated by (a space).
wkhtmltopdf --footer-center "My Text" ../input.html ../output.pdf
并带有多个
wkhtmltopdf --footer-center "My Text" --footer-left "Left content" ../input.html ../output.pdf
这篇关于wkhtmltopdf 因 --footer-center 参数而失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文