Memory problem during loading doc

Hi,
I’ve a problem when use .NET Aspose Word for load document.
When I load a large document (about 90 MB) , the memory increase until 2 GB.

This is the method :
Document doc = new Document(stream);

Most of time I need to read a couple of pages and not all entire document.
It’s possible to read a range of page without load all document?

I’ve noticed that Aspose.Excel have an option for optimize the memory.
Does there exist a similar option in Aspose Word?

Thanks in advance

Best regards

@lamfab 90MB is abnormally big MS Word document. I suspect even MS Word hangs upon loading it. Unfortunately, there is no way to partially load the document. however, you can use LoadOptions.TempFolder property to decrease the amount of allocated memory.
There is a similar property for saving - SaveOptions.TempFolder and SaveOptions.MemoryOptimization, which allow to decrease memory consumption while saving large documents.

Hi @alexey.noskov,
I tried your suggestion but it’s not working for me.
Do you have any other ideas?

@yogeshg Could you please share your document for testing? We will check it and provide you more information. But, I suspect, we will not be able to help you much in this case. As I already mentioned 90MB is abnormally huge document. It is not recommended to use such large documents.