mardi 22 mars 2016

How to place --header-html above margin-top with WKHTMLTOPDF

I have a (in my opinion) common scenario where I want to print a header with a logo on every page. The text on the document can overflow and needs to start on the second page below the header. The logo should start at 10 mm from the top. The text on the second page should start at 40mm from the top of the second page. If I specify top-marin -T 40mm then the header starts at 40mm also. If I specify -T 10mm then the text starts at 10mm also. I have tried to position the header with a CSS style attribute at "position:absolute;top:10mm" from the top and -T 40mm, and I have also tried to position using "margin-top:-30mm" but none of these work. Printing outside the specified margin parameters seems to be impossible. Am I missing something? The --footer-html is placed under the specified bottom-marign -B, why is the header not placed above the top margin?



How to place --header-html above margin-top with WKHTMLTOPDF

Aucun commentaire:

Enregistrer un commentaire