【问题标题】:wkhtmltopdf fails with --footer-center argumentwkhtmltopdf 因 --footer-center 参数而失败
【发布时间】:2016-02-19 00:12:37
【问题描述】:

我正在尝试使用 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 (with patched qt)

而man wkhtmltopdf 描述了--footer-center 参数

当然 input.html 已经存在于父目录中,如果我不添加 --footer-center 参数,一切都会完美运行

【问题讨论】:

    标签: wkhtmltopdf


    【解决方案1】:

    参数值必须用(空格)分隔,而不是=。

    wkhtmltopdf --footer-center "My Text" ../input.html ../output.pdf
    

    还有多个

    wkhtmltopdf --footer-center "My Text" --footer-left "Left content" ../input.html ../output.pdf
    

    【讨论】:

      猜你喜欢
      • 2018-10-18
      • 2021-09-22
      • 2014-12-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-11
      • 2015-04-18
      相关资源
      最近更新 更多