Search code examples
wkhtmltopdfwicked-pdfpdfkit

Header HTML has 100% height with wkhtmltopdf 0.12


I am using wkhtmltopdf 0.12 with wicked_pdf or pdfkit and the header takes almost 100% of the page height.

It creates these problems :

  • Pages are almost empty
  • There are many more pages than it should

Solution

  • Solved this by adding

    <!DOCTYPE html>
    

    at the top of the header HTML file.

    Somewhat capricious, I know...