When saving word doc to PDF with show revision ballon as error is thrown


When I try to save a word document with the LayoutOptions.revisionOptions.ShowRevisionBalloons option set to true it throws the following error:
Invalid Cast
Message: Unable to cast object of type ‘Aspose.Words.Markup.StructuredDocumentTag’ to type '\u000f'

The document opens and displays fine in word, I am not sure if it’s a bug or a problem with the document.

I have attached the document that is error and an example of the code:

var file = @"d:\input\Bad.docx";

var document = new Aspose.Words.Document(file);
document.LayoutOptions.RevisionOptions.ShowRevisionBalloons = true;

// throws an invalid case exception with a message of:  Unable to cast object of type 'Aspose.Words.Markup.StructuredDocumentTag' to type '\u000f   '
document.Save(@"d:\output\out.pdf", SaveFormat.Pdf);

Example.zip (64.6 KB)




While using the latest version of Aspose.Words i.e. 17.11, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-16209. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

The issues you have found earlier (filed as WORDSNET-16209) have been fixed in this Aspose.Words for .NET 18.1 update and this Aspose.Words for Java 18.1 update.
Please also check the following articles: