Arif Abbasi wrote: > The problem is that this code has to work with both HTML and PDF > reports, and am using:
As far as I know HTML doesn't allow you to add a header to each page as the concept of pages in HTML is inexistent. > HtmlWriter.getInstance(document, os); > PdfWriter.getInstance(document, os); > so I don’t want to use PdfPTable etc and working with Table. This is COMPLETELY IRRELEVANT. Why do you bring this up??? > Also, the example in the tutorial > http://itextdocs.lowagie.com/examples/com/lowagie/examples/directcontent/pageevents/EndPage.java > talks about extending PdfPageEventHelper class. Yes exactly, that is what you should do. > In this scenario I will end up writing two different methods > (one for HTML and one for PDF) and a lot of code that would be > specific to PDF reports for just adding header and footer. No you wouldn't. As I already said: HTML doesn't allow you to add a header to each page as the concept of pages in HTML is inexistent. You would only be adding a header/footer to the PDF document using page events. > I already have a footer that displays page number on every page. > I need to add a "mult-line" confidentiality language on every page, > but not part of footer. Use a page event to add it to the PDF. You won't be able to add such a header to the HTML because of the very nature of HTML. br, Bruno ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
