SaveToImage Change from 9.0 to 9.2

Hi,

In Words 9.0 I displayed a preview of a document as an image using the method below. Can you show me how to do the same with the new unified Save method of 9.3?

Dim stream As New MemoryStream()
m_Document.SaveToImage(_CurrentPage, 1, stream, ImageFormat.Bmp, Nothing)

This would create a single page image I could display to the user page number

Basically I want to have a preview window for a document that the user can view a particular page of a document, which I did using the above method

Thanks Bruce

Hi,

I resolved it myself as below

MemoryStream stream = new MemoryStream();

Aspose.Words.Saving.ImageSaveOptions opts = new Aspose.Words.Saving.ImageSaveOptions(Aspose.Words.SaveFormat.Tiff);

_CurrentPage=1;

opts.PageIndex = _CurrentPage;

opts.PageCount = 1;

m_Document.Save(stream, opts);

Image image = Image.FromStream(stream);

Hi Bruce,

It's great you have resolved the problem already. For future reference you can find information on how to change any code members to the new API in the migration article here.

Thanks,