I am trying to add some text the top of an html image using wkhtmltoimage. I am not sure if I am using the right argument. At the moment, I am failing with...
wkhtmltoimage --custom-header helloworld http://www.google.com google.png
The help file suggests I need a value after the text. It is not clear to me what this represents. I also would like to add more than one word (e.g. hello world). Is this possible?
--custom-headeris 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-Languagerequest header, you can request a specific language version by sending the custom header:In this example,
--custom-headeris used to request the Canadian-French (fr-CA) version of Google.What you're probably looking for is the
--header-htmloption, which is available withwkhtmltopdf(but not withwkhtmltoimage, from what I can tell):In this example, whatever HTML code is found in
/path/to/your/header/file.htmlfile gets prepended as the header.Read more about all of the header/footer options in the manual.