Hi, I need create PDF Form on the fly(I don't know how long the form will be).
I put the whole form into a big PdfPTable, now I have page break problem. After doing research I know I can't create new page inside PdfPTable. So I need calculate the height of PdfPtable, once the PdfPTable fill a page, close it, open a new page, create another PdfPtable. This is my idea. Please let me know if you have better way to do it. So I play the example RegisterForm1.java, try to calculate the height of the PdfPTable, but I always got tableheight = 0.0, why? This is my code. Please help me. ********************************************** PdfPTable table = new PdfPTable(2); PdfPCell cell; TextField field; table.getDefaultCell().setPadding(5f); table.calculateHeightsFast(); // I add this line table.addCell("Your name:"); cell = new PdfPCell(); cell.setFixedHeight(100f); // I add this line cell.setMinimumHeight(50f); // I add this line field = new TextField(writer, new Rectangle(0, 0), "name"); field.setFontSize(12); cell.setCellEvent(new RegisterForm1(parent, field.getTextField(), 1)); table.addCell(cell); System.out.println("height after your name="+table.getTotalHeight()); // why always height=0.0 ********************************************** I really need help. Thanks in advance. Sarah -- View this message in context: http://www.nabble.com/table.getTotalHeight%28%29-not-working-in-RegisterForm1.java-tp15206611p15206611.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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/