Hello,
I am using wkhtmltopdf and I am trying to add HTML pages as header and footer.
Here is the content of my pages:
header.html:
<html>
<body>
<h1>header</h1>
</body>
</html>
content.html:
<html>
<body>
My content
</body>
</html>
footer.html:
<html>
<body>
<h1>footer</h1>
</body>
</html>
The following command line result a blank PDF file (see file attached):
/usr/local/bin/wkhtmltopdf --header-html "http://projects.local/Testing/wkhtmltopdf/header.html" --footer-html "http://projects.local/Testing/wkhtmltopdf/footer.html" "http://projects.local/Testing/wkhtmltopdf/content.html" "/Users/felixveysseyre/Projects/Testing/wkhtmltopdf/test.pdf"
I am doing something wrong ? I am using latest version released for Mac OS X: _wkhtmltopdf 0.12.3 (with patched qt)_
Thanks for your help
Apparently, doctype is required to be rendered correctly.
I just added the following line and everything is fine now:
<!DOCTYPE html>
felixveysseyre You're absolutely right, it works for me too
Most helpful comment
Apparently, doctype is required to be rendered correctly.
I just added the following line and everything is fine now:
<!DOCTYPE html>