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.