On 4/08/2011 14:35, amrita wrote: > Hello, > > I want to add a pdf table at a particular position and at the same time i > want my table to get splitted across multiple pages. Please provide me an > example. > > my code below does not work
Of course not. What made you think the code you wrote would meet the above requirement? Did you read the book? Why are you defining a total width if you're adding the table to a ColumnText object? > table.setTotalWidth(450); > table.setSplitLate(true); The following line is irrelevant. > table.setSplitRows(true); > ColumnText ct = new ColumnText(cb); Are you sure that at least part of the table fits the rectangle defined in this line: > ct.setSimpleColumn(document.left(), 0, document.right(), > document.top() > - y + 50); > ct.addElement(table); You're invoking the go() method only once: > int status = ct.go(); This means your intention is to add only the first part of the table. If you want to add the rest of the table you need the insertPage() method, the hasMoreText() method and you need to invoke go() as long as there's still text in the column object. ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ 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
