I use this code for generating table in Rtf and can't understamd why it works 
incorrectly. Please help me

      Table table = new Table(12);
      table.setWidths(new float[] {3.0f, 1.1f, 1.2f, 1.0f, 1.0f, 1.1f, 1.2f, 0.
9f, 0.8f, 1.0f, 1.2f, 1.2f});
      table.setWidth(100);
      table.setAlignment(Table.ALIGN_CENTER);
      table.setSpacing(0);
      table.setPadding(0);
      Cell cell = new Cell(new Phrase("1", t10));
      cell.setColspan(12);
      table.addCell(cell);
      cell = new Cell(new Phrase("2", t10));
      cell.setRowspan(2);
      table.addCell(cell);
      cell = new Cell(new Phrase("3", t10));
      cell.setRowspan(2);
      table.addCell(cell);
      cell = new Cell(new Phrase("4", t10));
      cell.setRowspan(2);
      table.addCell(cell);
      cell = new Cell(new Phrase("5", t10));
      cell.setColspan(3);
      table.addCell(cell);
      cell = new Cell(new Phrase("6", t10));
      cell.setRowspan(2);
      table.addCell(cell);
      cell = new Cell(new Phrase("7", t10));
      cell.setColspan(3);
      table.addCell(cell);
      cell = new Cell(new Phrase("8", t10));
      cell.setRowspan(2);
      table.addCell(cell);
      cell = new Cell(new Phrase("9", t10));
      cell.setRowspan(2);
      table.addCell(cell);
      cell = new Cell(new Phrase("10", t10));
      table.addCell(cell);
      cell = new Cell(new Phrase("11", t10));
      table.addCell(cell);
      cell = new Cell(new Phrase("12", t10));
      table.addCell(cell);
      cell = new Cell(new Phrase("13", t10));
      table.addCell(cell);
      cell = new Cell(new Phrase("14", t10));
      table.addCell(cell);
      cell = new Cell(new Phrase("15", t10));
      table.addCell(cell);
      doc.add(table);




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to