I am using the code below to generate a thumbnail from the first page of word docs that we and our users upload into our system. The attached word doc has issues in aspose though. as soon as I hit the doc.Save line, it just gets stuck and never returns. This in turn will time out the wcf call to the service that contains this code. I ran this code in a sample app and cpu usage is around 10-15% consistently. It never returns so I am thinking this is a bug in aspose not dealing with some formatting in this doc. I have tried both the dec 2013 release of aspose.words and also the latest version and both behave exactly the same. ideas?
public Image CreateThumbnail(byte[] file, int startPage, int resolution)
{
using (MemoryStream ms = new MemoryStream(file))
{
Document doc = new Document(ms);
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.Png);
options.PageCount = 1;
options.PageIndex = startPageā;
options.Resolution = resolution;
Image result = null;
using (MemoryStream stream = new MemoryStream())
{
doc.Save(stream, options);
result = Image.FromStream(stream);
//return ms.GetBuffer();
}
return result;
}
}
Hi Kirk,
Best regards,
The issues you have found earlier (filed as WORDSNET-10774) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan