Xportability / css-to-pdf

Convert any HTML page or region to PDF - supports CSS, SVG, embedded XML objects, and more..
http://www.cloudformatter.com/CSS2Pdf
207 stars 77 forks source link

Header is overlapping content in the following pages #76

Open carduque opened 6 years ago

carduque commented 6 years ago

Hi, Header is fine on first page but it overlapping the content in the following pages. Any idea what to do? image

kbrown01 commented 6 years ago

You do not have enough space allocated. The header area in your example you sent to our email shows it uses just the standard 48px, the margin-top of the block you are inserting in it is already 24px so the header is starting 24px down from the top. If I increase the header size in your example to 60px from 48px, I get no overlap.

kbrown01 commented 6 years ago

I would note it may even need to be larger, your image is certainly taller that the only 24px you allocate for the header,

image

kbrown01 commented 6 years ago

One additional note, you should move the <script> code outside of the <div> you are actually rendering, This can cause issues because many scripts would contain illegal XML characters and we are parsing the DOM and making XML from it. The script is not needed to format the document so there is no need to include it in the <div> being formatted, just move to the end.

carduque commented 6 years ago

Thanks. How to increase those standard 48px for the header?