Saving a thumbnail with aspose.words gets stuck

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,

Thanks for your inquiry. I tested the scenario and have managed to reproduce the same problem. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-10774. We will further look into the details of this problem and keep you updated on the status of correction. We apologize for your inconvenience.

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