Free Support Forum -

Nested tables with DocumentBuilder saving to PDF throws error

Are nested tables supported when saving to a PDF format?

The following code generates an error:

string err;

string asposeHTML = "

Hello World

Aspose.Words.Document asposeDoc = new Aspose.Words.Document();

Aspose.Words.DocumentBuilder asposeDb = new Aspose.Words.DocumentBuilder(asposeDoc);


System.IO.MemoryStream asposeStream = new MemoryStream();



//blows up here

asposeDoc.Save(asposeStream, Aspose.Words.SaveFormat.FormatAsposePdf);


catch (Exception ex)


err = ex.Message;






The above code works without the nested tables.

Thanks for reporting this problem to us.

I have reproduced the error and logged it to our defect base (issue #1129). We will try to fix it in the next hotfix which will be published by the end of August.

Generally, the nested tables are fully supported in Aspose.Words and are correctly exported to PDF. the problem is caused by incorrect table creation when inserting this particualr HTML string.

Best regards,

We have fixed this issue in Aspose.Words 4.0. Please try with this new version.