Hi list!

 

I would like to use a different header on the first page versus the following pages. Both headers are tables implemented using PdpPTable. The header for page 1 is larger than the one used for page 2 and forward. The content of the page should follow directly beneath the header table.  To achieve this I  realise that I must find a way to manipulate the margins in the document to prevent the content from overwriting the headers.

 

I have implemented this using onStartPage() to place my headers in order to be able to calculate the height of the header table (using tab.getTotalHeight()) and changing the margins before any content is written to the document. I use document.setMargins(LEFT, RIGHT, newTop, newBottom)  to set the new margins.

 

But this is not working as it should!!

 

The margins on the first page is just as I initiated them when the document object was created. The margins does change on page 2 to those intended for page 1. On page 3 everything looks like it should.

 

What am I doing wrong…??

 

 

mvh

 

// Niklas Pettersson

SchoolSoft

 

Reply via email to