Free Support Forum - aspose.com

Unable to Render Second Page on Word Document

Hi!

We are having problems exporting the JPG of this document. The first page render correctly, but when trying to extract the second page, an exception rises. The stack information isn't very useful. Any help would be appreciated.

Aspose Words is Version 9.6.0.0

The problem document is attached. And the code snippet goues as follows:

Document doc = new Document(mStream);

//doc.UpdatePageLayout();

previewPage.TotalPages = doc.PageCount;

using (MemoryStream thumbnail = new MemoryStream())

{

ImageSaveOptions imageOptions = new ImageSaveOptions(SaveFormat.Jpeg);

imageOptions.PageIndex = pageNumber - 1;

imageOptions.PageCount = 1;

doc.Save(thumbnail, imageOptions); <-- Exception occurs here.

previewPage.PageNumber = pageNumber;

previewPage.StoredFile = thumbnail.ToArray();

}

Hello

Thanks for your request. I cannot reproduce the problem on my side using the latest version of Aspose.Words (10.1.0) for testing.

You can download the latest version from here:

http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

Best regards,

Indeed,

It works fine in the latest version you mentioned.

Best Regards NS thanks for you insight.