Op 21/02/2012 0:55, Rod Hall schreef: > We ported our java application from Google App Engine to a dedicated > server running Tomcat. PDF creation works great, except that it > appears that onEndPage is no longer called, as we are not getting our > page headers or footers anymore. Code looks good, we still have our > PdfHeaderFooter class which extends PdfPageEventHelper and includes > onEndPage, and we still have: > > PdfHeaderFooter event = new PdfHeaderFooter(teacher, > pdfData.getPrintView(), pdfData.getPrintStartDate(), > pdfData.getPrintEndDate(), pdfData.getPrintLayout()); > writer.setPageEvent(event); > > Anything obvious I should check?
As you position stuff on absolute positions in a page event, I'm pretty sure you need resources, such as a BaseFont, or maybe you're also fetching an Image. On Google App Engine, you probably get those as an InputStream, but how do you deal with resources on Tomcat? Maybe you have an Exception somewhere: 'font not found' or 'image not found', causing a resource to be null, causing the content to be lost. That's the first thing that comes to mind, and the first thing I would check when faced with this problem. If it's something else (and you found the solution), please post it here so that we can use it for further reference. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
