I am using wkhtmltopdf to create PDF reports from HTML, I need to create a custom report that follows this pattern:
- Some information at the top of the first page.
- A table that can have 1 to n rows (it should use any amount of pages it needs)
- Some information at the end of the last page.
Putting all this together does the trick; however because step 3 info appears immediately after the table, is there a way to put the content at the end of the page?
I am not even sure if this solution is CSS based or wkhtmltopdf based.
http://madalgo.au.dk/~jakobt/wkhtmltoxdoc/wkhtmltopdf-0.9.9-doc.html
Take a look at “Footers And Headers” section.
You can use
--footer-htmlcombined with some JavaScript to do this.I based the contents of my
footer.htmlon the example provided in the link above: