That's a situation where you must leave Document.add() and do your own layout with ColumnText.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Niklas Pettersson > Sent: Tuesday, March 28, 2006 11:29 AM > To: [email protected] > Subject: [iText-questions] Changing document margins from one > page to the other > > 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 > > > > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
