Search code examples
htmlcssfooterwkhtmltopdfmargins

wkhtmltopdf margin between body and footer


I am generating a report using wkhtmltopdf, this reports contains texts with a variable length for this reason I not always can force the page break, sometimes wkhtmltopdf has to do it for me.

I am trying to find out if there is any way of forcing a margin between the footer introduced with wkthtmltopdf (--footer-left foo --footter-right [page]) and the body of the page.

I have already tried with the CSS margin-bottom but it does not work since it is applied to the end of the html not the page breaking.

And i have also tried the wkhtmltopdf margin bottom "-B 10mm" but it does not work since it is also applied to the footer.

Any clues please?

Thanks in advance.


Solution

  • I tried and tried and the solution for this problem is to use wkhtmltopdf flag:

    --footer-spacing