I’ve just downloaded the latest release, 9.5.0.0, and code that was working before now throws an exception. We are using the following code to generically save a Word file as a PNG so we can use the file as a preview. The following code worked on the attached file before this release, although the file does not get fully displayed because to contains SmartArt. With this release, the Save command throws an exception.
Dim wordDoc As Aspose.Words.Document = TryCast(CurrentDoc, Aspose.Words.Document)
If wordDoc IsNot Nothing Then
Using imageStream As New MemoryStream Dim saveOpts As New Aspose.Words.Saving.ImageSaveOptions(Aspose.Words.SaveFormat.Png)
saveOpts.PageIndex = Index
wordDoc.Save(imageStream, saveOpts)
CommonDownload.DeliverBytes(ScaleImage(New Bitmap(imageStream), maxWidth, maxHeight).ToArray(), "image/png")
End Using
End If
I’ve attached the example file that fails.
Thanks,
Andy.