We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Bug in Aspose.Words (Silverlight)

Hi Aspose,
I have a MS Document cannot convert to xps Stream. please see the attachment.

var document = new Document(filePath);
Stream s = new MemoryStream();
document.Save(s, SaveFormat.Xps);
s.Position = 0;
byte[] data = new byte[s.Length];
    s.Read(data, 0, data.Length);


Thanks for your request. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed. As a workaround you can try open/save the attached document using MS Word and then convert to XPS using Aspose.Words.
Best regards,

Hi Aspose,
First let me thank you for providing great products and excellent support.

Because we use OpenXML SDK to create the word file, so the workaround method they provided doesn’t work. My company is testing your product, please solved the problem as soon as possible.


Thank you for your inquiry.
Unfortunately we can not promise a quick solution to your problem. At this point analysis of the issue has not yet ended. Once developers will analyse the problem, we can tell the estimates. We will notify you of any developments.

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)
// Save document as XPS.
doc.Save(@"Test001\out.xps", SaveFormat.Xps);

Hope this helps.
Best regards,

Thanks very much for your support.

The problem has been solved according to your advice.

We will continue doing more complete test.

The issues you have found earlier (filed as 24825) have been fixed in this .NET update and in this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.