Exception during open RTF document


#1

Hi Aspose support,
After update Aspose.Words.dll from version 18.12.0 to versions 19.6.0 we noticed exception during specific document open.
Details:
Exception: “Unable to cast object of type ‘Aspose.Words.BookmarkStart’ to type 'Aspose.Words.Drawing.ShapeBase’”
Reproduces on latest versions: 19.6.0, 19.7.0
Does not reproduce on 18.12.0
Document:Example.zip (940.0 KB)

Codes sample:

      private static void ConvertWordToPDF(string inputFile, string outputFile, string openPassword)
    {
        Aspose.Words.Document doc = new Aspose.Words.Document(inputFile, new Aspose.Words.LoadOptions() { Password = !string.IsNullOrEmpty(openPassword) ? openPassword : null }); // Exception is on this line.
        doc.Unprotect();
        if (File.Exists(outputFile))
            File.Delete(outputFile);
        
        doc.Save(outputFile, Aspose.Words.SaveFormat.Pdf);
    }

Please help with solving the issue.


#2

@licenses,

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

Edit: We see the same problem when using 18.12 on our end. However, Aspose.Words for .NET 18.2 does not cause this problem.


#3

The issues you have found earlier (filed as WORDSNET-18820) have been fixed in this Aspose.Words for .NET 19.8 update and this Aspose.Words for Java 19.8 update.


#4

Hi @awais.hafeez,
I confirm that 19.8 version fix the problem.
Thanks.