Hi all. I'm trying to get the current Y coordinate while I"m inserting text and images into a ColumnText. I've tried a bunch of things, none of which seemed to work. Here's a summary:
(1) PdfWriter.getVerticalPosition() and PdfWriter.getVerticalPosition(true) both always return the same value: 806.0 (2) PdfWriter.setPageEvent() I created an inner class that extends PdfPageEventHelper and overrides onParagraph() and onParagraphEnd(). Neither routine was ever called. I also wrote a class that implements PdfPageEvent, just on the off chance that I misspelled one of the routine names or the method signatures were wrong. In this case, onEndPage(), onStartPage(), and onCloseDocument() were called, so I know the class is being registered properly, but I still didn't get any callbacks to onParagraph[End](). Is there something I need to do to enable paragraph callbacks? The code looks something like this: public class Handler extends PdfPageEvent { ... public void onParagraph (PdfWriter writer, Document document, float position) { System.out.println ("onParagraph"); } ... } ... Document document = new Document(); PdfWriter writer = PdfWriter.getInstance (document, outputStream); document.open(); writer.setPageEvent (new Handler()); ... Any suggestions? Thanks! Greg ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/