Background Color:
 
Background Pattern:
Reset
Search
Home Recent Changes Show All Pages

Page header and footer margins

1

Page headers and / or footers have the same margins and padding as the content of the page. This works for most scenarios because it gives visual distance between the two groups, but can sometimes become over-large

When you are woking with pages and their headers you can set up a page with some margins and padding as below.

    <pdf:Page id="Header_Spacing" styles:margins="20pt" styles:padding="20pt" styles:border-color="black" visible="false" >
      <Header>This is the header</Header>
      <Content>This is the content</Content>
    </pdf:Page>

This will render as below with the margins and padding in place for both the page content block, and the header block as well.

 

So we are not happy - let's remove the spacing, because it is too large

    <pdf:Page id="Header_Spacing" styles:border-color="black" >
      <Header>This is the header</Header>
      <Content>This is the content</Content>
    </pdf:Page>

 

Now we have the header where we want it, but our content is too close. So lets wrap it in a div and put some padding around this

   <pdf:Page id="Header_Spacing" styles:border-color="black" >
      <Header>This is the header</Header>
      <Content>
        <pdf:Div id="body" styles:margins="20pt" styles:border-color="black" >
          This is the content
        </pdf:Div>
        </Content>
    </pdf:Page>

This now gives us the spacing in the content of the page, but not bloating our header

We could of course go on and add a div with a small amout of padding to the header if needed.



  Rating
Rate This Page: Poor Great   |  Rate Content |
Average rating:  1   
10000
12345
Number of Ratings : 1
  Comments
Add Comment
No Comments Yet