I have a project that I need to complete, and this involves some wkhtmltopdf troubleshooting. So far I have been able to add header and footer dynamically by using "--header-html" and "--footer-html" commands when creating my pdf. The problem that I need help in solving is like my title states. I need to figure out how to call --header-spacing when calling --header-html command.
As of right now, I have tried the following command:
wkhtmltopdf -O landscape -L 0mm -R 0mm --header-spacing 5mm <target-page-url> --header-html "<target-header-location>" --footer-html "<target-header-location>" sample.pdf
wkhtmltopdf -O landscape -L 0mm -R 0mm <target-page-url> --header-html --header-spacing 5mm "<target-header-location>" --footer-html "<target-header-location>" sample.pdf
Both of these commands result in an error.
Error: Failed loading page http: (sometimes it will work just to ignore this error with --load-error-handling ignore)
If you know how to accomplish this, please let me know.
Thanks in advance.