Actually I received a reply from the Pdf group that the latest Words release fixed this problem. I still have an issue with the column widths though. I attached a zip that contains the doc, pdf and template doc that my proess uses. You will see that the colums in the Word doc look correct but the section of the pdf that contains a html table has a different column widths than the other sections.
Two other issues I need to correct are getting the sections to flow together and not start on a separate page. This may just be a format issue with the template doc but I don't know what to change. The paragraphs flow correctly if I am not using tables.
The last issue is empty cells in the right hand column. I have a differnt process that uses a 2 column table where the rows span both colums. I use this code to remove empty rows:
while (RemoveEmptyRows(doc)) { };
bool RemoveEmptyRows(Document doc)
{
bool emptyRow = true;
foreach (Aspose.Words.Section section in doc.Sections)
{
foreach (Aspose.Words.Table table in section.Body.Tables)
{
foreach (Aspose.Words.Row row in table.Rows)
{
foreach (Aspose.Words.Cell cell in row.Cells)
{
string c = cell.GetText().Trim();
emptyRow = (c == "\a");
}
if (emptyRow)
row.Remove();
}
}
}
return emptyRow;
}
If I move the if(emptyRow) Row.Remove under the emptyRow = (c == "\a");
and change it to cell.remove the formatting of the table gets messed up. How can I remove empty rows/cells from the right hand column only?