Hi
Thanks for your request. An empty Structured Document Tag within a table causes the problem. Please see the attached screenshot. So, if you have a control over document generation process you can correct this. If not, you can just remove an empty SDT before rendering the document. For instance, see the following code:
// Open document.
Document doc = new Document(@"Test001\in.docx");
// Get collection of Structured Document tags.
Node[] sdts = doc.GetChildNodes(NodeType.StructuredDocumentTag, true).ToArray();
// Loop through all SDTs and remove empty SDTs with tables.
foreach(StructuredDocumentTag sdt in sdts)
{
if (sdt.Level == MarkupLevel.Row && !sdt.HasChildNodes)
sdt.Remove();
}
// Save document as XPS.
doc.Save(@"Test001\out.xps", SaveFormat.Xps);
Hope this helps.
Best regards,