We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

DocumentRenderer obsolete

I was using this code before to get an array of bitmaps but after upgrading, DocumentRenderer is no longer there.

DocumentRenderer renderer = new DocumentRenderer(_document);
Bitmap[] pages = renderer.GetPages();

How can I accomplish this same task?

Hi

Thanks for your request. You can use SaveToImage method. Please see the following link for more information:
https://reference.aspose.com/words/net/aspose.words/document/save/
Please let me know in case of any issues, I will be glad to help you.
Best regards.

If I do this

MemoryStream tmpStream = new MemoryStream();
_document.SaveToImage(0, 1, stream, ImageFormat.Bmp, null);

how do I get all pages if I don’t know the document page count? Can I just get the page count from the document?

Hi

Thanks for your request. Of course, you can. You should just use Document.PageCount property:
https://reference.aspose.com/words/net/aspose.words/document/pagecount/
Best regards.

ok, great…thanks for your help