I am trying to put two nested tables in a table with one column and two
rows. The nested tables have two columns but with different widths. But
they both get the same width ratio after being inserted in the parent table.
Neither insertTable(nestedTable) nor addCell(new Cell(nestedTable)) works.
Any suggestions?
/Fredrik
Document doc = new Document();
PdfWriter.getInstance(doc, new FileOutputStream("test.pdf"));
doc.open();
Table table = new Table(1);
float widths[] = new float[2];
widths[0] = (float) 0.3;
widths[1] = (float) 0.7;
Table nestedTable = new Table(2);
nestedTable.setWidths(widths);
nestedTable.addCell("AAA");
nestedTable.addCell("BBB");
table.addCell(new Cell(nestedTable));
//table.insertTable(nestedTable);
widths = new float[2];
widths[0] = (float) 0.1;
widths[1] = (float) 0.9;
nestedTable = new Table(2);
nestedTable.setWidths(widths);
nestedTable.addCell("CCC");
nestedTable.addCell("DDD");
table.addCell(new Cell(nestedTable));
//table.insertTable(nestedTable);
doc.add(table);
doc.close();
_______________________________________________________
Skicka gratis SMS!
http://www.passagen.se
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions