问题
Im trying to insert text into the footer with wkhtmltopdf.
wkhtmltopdf ../input.html ../output.pdf --footer-center="My Text"
But it just gives me the error
Unknown long argument --footer-center=My Text
I have tried many ways
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
But all results in
Unknown long argument --footer-center=My Text
Im using wkhtmltopdf 0.12.1 (with patched qt)
And man wkhtmltopdf
describes the --footer-center
argument
And of course input.html already exists in the parent directory, and everything works perfect if I dont add the --footer-center argument
回答1:
Instead of =
the parameter value has to be separated by (a space).
wkhtmltopdf --footer-center "My Text" ../input.html ../output.pdf
And with multiple
wkhtmltopdf --footer-center "My Text" --footer-left "Left content" ../input.html ../output.pdf
来源:https://stackoverflow.com/questions/28746794/wkhtmltopdf-fails-with-footer-center-argument