Hi there,
I'm using the iText to create in a dinamically way an html document.
My problem is that I can't find a way to append a table inside a cell.
Can anyone help to find out the solution?
Thanks in advance.


CODE

document.add(new Header(MarkupTags.STYLESHEET, "style.css"));

// step 3: we open the document
document.open();
Table mainTable = new Table(1);
mainTable.setSpacing(0);
mainTable.setPadding(0);
mainTable.setBorder(0);
mainTable.setWidth(100);
mainTable.setMarkupAttribute(ElementTags.ID, "mainTable");

/*Table secondTable = new Table(1);
secondTable.setSpacing(0);
secondTable.setPadding(0);
secondTable.setBorder(0);
secondTable.setWidth(1);
secondTable.setMarkupAttribute(ElementTags.ID, "secondTable");
//mainCell.addElement(secondTable);*/

Cell mainCell = new Cell();
mainCell.setMarkupAttribute(ElementTags.ID, "mainCell");
mainTable.setBorder(0);
mainCell.setWidth(1);
mainTable.addCell(mainCell);



/*Cell secondCell_1 = new Cell();
secondCell_1.setMarkupAttribute(ElementTags.ID, "secondCell_1");
secondCell_1.setWidth("0");
secondTable.addCell(secondCell_1);*/



document.add(mainTable);