If you keep ignoring the examples in the tutorial it will never work.

Paulo


----- Original Message ----- From: "Ken" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, April 18, 2006 8:42 PM
Subject: [iText-questions] HeaderFooter foolishness


Sorry, still not tracking on why this works on the second page but not the first.

         public void onStartPage(PdfWriter arg0, Document arg1)
         {
             if (sensitivity != null)
             {
                  Phrase phrase = new Phrase(sensitivity.toUpperCase(),
                          new Font(Font.TIMES_ROMAN, 10, Font.BOLDITALIC));
                  HeaderFooter hf = new HeaderFooter(phrase, false);
                  hf.setAlignment(HeaderFooter.ALIGN_CENTER);
                 arg1.setHeader(hf);
                 arg1.setFooter(hf);
             }

         }

BTW, even though the document only has 2 pages, a println placed in the above code reports 3 startPage events.


---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.


-------------------------------------------------------
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&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to