--custom-header
is for sending HTTP request headers to a URL, not for making headers as you would in a word processor.
For example, if you have a multilingual website that responds to the Accept-Language
request header, you can request a specific language version by sending the custom header:
wkhtmltopdf --custom-header Accept-Language fr-CA http://www.google.com google.pdf
In this example, --custom-header
is used to request the Canadian-French (fr-CA
) version of Google.
What you're probably looking for is the --header-html
option, which is available with wkhtmltopdf
(but not with wkhtmltoimage
, from what I can tell):
wkhtmltopdf --header-html /path/to/your/header/file.html http://www.google.com google.pdf
In this example, whatever HTML code is found in /path/to/your/header/file.html
file gets prepended as the header.
Read more about all of the header/footer options in the manual.