PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: Inconsistent spacing between header and first line of page?
   PostPosted: 21 Dec 2010, 22:32 
I'm using a very simple test with a header and footer defined, and a bunch of text content spanning multiple pages, and I noticed that the space between the header and the first line of content varies from page to page.

Here's my test html:

<pd4ml:page.header scope="1+">
Header Text
</pd4ml:page.header>
<pd4ml:page.footer scope="1+">
Footer Text
</pd4ml:page.footer>
Here is some repeating content Here is some repeating content Here is some repeating content Here is some repeating content....[clipped for forum posting]

I've attached the pdf output. Notice how the spacing is different on all 3 pages. Is there a way to make the spacing consistent?


Attachments:
pd4ml_output.pdf [5.25 KiB]
Downloaded 71 times
  Subject: Re: Inconsistent spacing between header and first line of page?
   PostPosted: 22 Dec 2010, 14:59 
The gap on the first page is caused by <body> margin.

With <body style="border: 1 solid tomato"> you may inspect actual document content edges. The margins could be suppressed by corresponding <body> tag attributes or by CSS properties.

The minor differences on the subsequent pages depend on implicit page break position. PD4ML tries to shift the position to avoid text line from being split. That gives some minor fluctuations, I guess.


  Subject: Re: Inconsistent spacing between header and first line of page?
   PostPosted: 23 Dec 2010, 00:38 
Thanks for the reply. Setting the <body> margins to 0px addressed the issue.



[Reply]     [ 3 posts ] 

Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share