I have a junit test which fails with an exception. I would much like your advice on how to get this to work. How can I represent this html in itext? It works if I add the table directly to the document.
PdfWriter.getInstance(document, new FileOutputStream("/tmp/tmp.pdf")); RtfWriter2.getInstance(document, new FileOutputStream("/tmp/tmp.rtf"));
document.open();
// create a table with two columns Table table = new Table(1);
// create four cells table.addCell(new Cell("foo")); table.addCell(new Cell("bar"));
// create a list List list = new List();
// create a list item ListItem li = new ListItem();
// try to add the table to the list item if (!li.add(table)) { throw new RuntimeException("li {" + li + "} could not add table {" + table + "}"); }
// try to add the list item to the list if (!list.add(li)) { throw new RuntimeException("list {" + li + "} could not add li {" + li + "}"); }
document.add(list);
document.close();
}
}
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ iText-questions mailing list iText-questions@(protected) https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/