Lajara Daniel wrote:
>     public void onEndPage(PdfWriter writer, Document document)

>        HeaderFooter footer =  new HeaderFooter(new Phrase("Pag."), true);
> 
>        footer.setAlignment(com.lowagie.text.Element.ALIGN_RIGHT);
>        footer.setBorder(Rectangle.NO_BORDER);
>        ((Document) document).setFooter(footer);

This is very, very, very, very wrong.
You won't find this kind of code in any of the documentation.
If you did, please let me know and I'll try to have it removed.

Please use official examples!
http://1t3xt.info/examples/browse/?page=example&id=223
http://1t3xt.info/examples/browse/?page=example&id=319

As documented in the book about iText, you may use the Document object 
passed to a page event FOR READ-ONLY PURPOSES ONLY, you may not use 
document.add() or document.setFooter() in a page event!

Also: don't use the HeaderFooter class, please!
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to