Document.save Out Of Memory Error

Hi, I’m using Aspose.Words to export text documents, and get a ‘java.lang.OutOfMemoryError: Java heap space’ messages when calling the save method on some documents. The document I’m using has about 14MB of images in it. I am allowing 150MB to be allocated to the jvm and this is the maximum i can allocate. Are there any solutions you know of? I’ve checked the other threads but couldn’t see any.

Thanks

Hi
Thanks for your inquiry. Usually Aspose.Words needs about 10 times more memory for building the model than the source document size. But this is dependent on your document. I think that as a workaround you can split your document and use several smaller documents instead one big document.
Best regards.

Hi, thanks for the response. Unfortunately splitting the document up is not an option for us. Are there any workarounds that could keep the document as one?

Thanks

Hi
Thanks for your inquiry. I can suggest only increasing memory. This should help in your case. Also you can try refactoring your document (decrease size of images etc.)
Best regards.