We use Aspose to generate PNG preview files of our Word documents as follows:
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
If the Word file contains a graphic, is ALWAYS floats over the text, rather than paying attention to the properties of the graphic. Is this a known bug? Is there a fix or work-around? We’ve had this problem for a LONG time and our customers are expecting it to be fixed soon:)
I’ve attached an example file.
Thanks,
Andy.