Martin-
Martin-

Reputation: 927

wkhtmltopdf fails with --footer-center argument

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

Upvotes: 1

Views: 2157

Answers (1)

Martin-
Martin-

Reputation: 927

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

Upvotes: 3

Related Questions