[iText-questions] Problem getting onStartPage() triggered
In the following code, the onStartPage() method is never called, even though the test document has many pages. Any thoughts about what to fix, where to look? Thanks in advance, ---mister bean re package platypus.pdf; import com.lowagie.text.pdf.*; import com.lowagie.text.Document; import platypus.*; /** * Performs non-content actions related to the start of a new page. Per iText, * new-page content should be added using the onEndPage() method. * * Reference: http://itextdocs.lowagie.com/tutorial/directcontent/pageevents/index.php * * @author alb */ public class OnPageStart extends PdfPageEventHelper { /** * Perform all new-page related functions that don't involve placing content on the page. * * @param writer PdfWriter (supplied by iText) * @param doc PdfWriter (supplied by iText) */ @Override public void onStartPage( PdfWriter writer, Document doc ) { incrementPageCounter(); incrementPageNumber(); } ... } -- View this message in context: http://www.nabble.com/Problem-getting-onStartPage%28%29-triggered-tp14356024p14356024.html Sent from the iText - General mailing list archive at Nabble.com. - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] Problem getting onStartPage() triggered
Sorry, my error. Found the problem. Please ignore. blush ---mister bean mister bean wrote: In the following code, the onStartPage() method is never called, even though the test document has many pages. Any thoughts about what to fix, where to look? Thanks in advance, ---mister bean re package platypus.pdf; import com.lowagie.text.pdf.*; import com.lowagie.text.Document; import platypus.*; /** * Performs non-content actions related to the start of a new page. Per iText, * new-page content should be added using the onEndPage() method. * * Reference: http://itextdocs.lowagie.com/tutorial/directcontent/pageevents/index.php * * @author alb */ public class OnPageStart extends PdfPageEventHelper { /** * Perform all new-page related functions that don't involve placing content on the page. * * @param writer PdfWriter (supplied by iText) * @param doc PdfWriter (supplied by iText) */ @Override public void onStartPage( PdfWriter writer, Document doc ) { incrementPageCounter(); incrementPageNumber(); } ... } -- View this message in context: http://www.nabble.com/Problem-getting-onStartPage%28%29-triggered-tp14356024p14356854.html Sent from the iText - General mailing list archive at Nabble.com. - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/