Hi Jaime,
Upon further invesigation, it appears this issue occurs because the tables are loaded from HTML as having very large width (even larger than the page). When saving to a Word format and opening with Microsoft Word, these tables are automatically sized to the page width by default. However when rendering these stay at the same size and appear outside the page which is why the rendered output looks incorrect.
You can use the code below as a work around to fix this in the mean time. This code will fit the tables in the document to the width of the page in the same way MS Word does. This makes the output document look much better. You can find the FitTableToPageWidth method in this article here.
// Fit all tables to the page width.
foreach (Table table in doc.GetChildNodes(NodeType.Table, true))
{
FitTableToPageWidth(table);
}
// Manually extend the outer table a bit if you want to make sure that the red background comes through.
Table firstTable = (Table)doc.GetChild(NodeType.Table, 0, true);
firstTable.FirstRow.FirstCell.CellFormat.Width += 100;
Thanks,
Adam Skelton
Programming Writer
Aspose Auckland Team