Free Support Forum - aspose.com

Aspose.Words getting Out of Memory exception when loading document

I am using Words version [4.0.4.0]. I have two word documents. The first document is used for mail merging. The second document is the result of the mail merge. However, when I re-load the second document back in for conversion to pdf, Apose.Words takes up over 400mb of memory and then I get an out of memory exception. The Out of memory exception happens in the constructor of the Aspose.Words.Document class. In the attached zip file are the following files:

NBV01tpl.doc - First document that is used for merging

NBV01tpl_1.DAT - Data for the mail merging

NBV01tpl_1_Merged.doc - Second document that is the result of the mail merge.

Thanks

Ryan

Hi

Thanks for your inquiry. I can’t reproduce this problem using the latest version of Aspose.Words. Please try using the latest versions of Aspose.Words (5.0.2) and Aspose.Pdf (3.6.2.0).

http://www.aspose.com/community/files/51/aspose.words/entry114195.aspx

http://www.aspose.com/community/files/51/aspose.pdf/entry113366.aspx

Best regards.

I downloaded the latest versions and tried them. I do not get the Out of Memory Exception, however, I still see the the memory jump to over 400mb when reading in an 8mb file. Is this normal?

thanks

Hi

You can try to generate a few small documents instead one large. Aspose.Words would utilize about 100Mb of memory on x32 system and about 200Mb of memory on x64 system for processing file that has 8Mb.

Best regards.