Hi! I am trying to generate a pdf document from an html using the "HTML to PDF" plugin. The html structure used is the following:
// HTML <table> <thead><tr><td> <div class="header-space"> </div> </td></tr></thead> <tbody><tr><td> <div class="content">...</div> </td></tr></tbody> <tfoot><tr><td> <div class="footer-space"> </div> </td></tr></tfoot></table><div class="header">...</div><div class="footer">...</div>// CSS.header, .header-space,.footer, .footer-space { height: 100px;}.header { position: fixed; top: 0;}.footer { position: fixed; bottom: 0;}The problem comes when transforming to PDF. It works by replicating the header, but from the second page the content overlaps the header.My cloud version is 22.3
Discussion posts and replies are publicly visible
To avoid this issue, you can try setting the position of the header to "absolute" instead of "fixed". This will keep the header in the normal document flow..header { position: absolute; top: 0; } .footer { position: fixed; bottom: 0; }
.header { position: absolute; top: 0; } .footer { position: fixed; bottom: 0; }
You can do that using specific CSS. Check the documentation of the used library: github.com/.../openhtmltopdf
With absolute position, not replicated each page only first
Did you resolve this and if so, how?
Hey Stefan, there is a lot going on in the library you linked and I don't have much experience with github. Can you point to the file that refers to this topic?