Table is not supported anymore. Use a PdfPTable and do the rowspan with nested tables.
----- Original Message ----- From: "rady saing" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Sunday, September 11, 2005 8:11 PM Subject: [iText-questions] setCellsFitPage(true) Hi, I am writing a problem using iText, that use rowspan over more pages and also need to Cells fit page automatically. but it has problem , when I try using method setCellsFitPage(true) . The outpuf pdf file will increase size innormally. Could you give me the solutions. Thanks in advance. Rady ------------------------- import java.awt.Point; import java.io.FileOutputStream; import java.io.IOException; import com.lowagie.text.*; import com.lowagie.text.pdf.PdfWriter; public class Chap0501 { public static void main(String[] args) { System.out.println("Chapter 5 example 1: my first table"); // step 1: creation of a document-object Document document = new Document(); try { // step 2: // we create a writer that listens to the document // and directs a PDF-stream to a file PdfWriter.getInstance(document, new FileOutputStream("Chap0501.pdf")); // step 3: we open the document document.open(); // step 4: we create a table and add it to the document Table aTable = new Table(4,10); // 10 rows, 4 columns aTable.setAutoFillEmptyCells(true); aTable.setCellsFitPage(true); // problem here for ( int row=0; row<100; row++){ aTable.addCell("row " + row, new Point(row, 3)); } int rowIndex = 4; int rowSpan = 96; Cell cell = new Cell("row" + rowIndex); cell.setRowspan(rowSpan); aTable.addCell(cell, new Point(rowIndex,0)); document.add(aTable); } catch(DocumentException de) { System.err.println(de.getMessage()); } catch(IOException ioe) { System.err.println(ioe.getMessage()); } // step 5: we close the document document.close(); } } --------------------------------- Yahoo! for Good Watch the Hurricane Katrina Shelter From The Storm concert ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
