Increasing the heap size should fix the issue.
If it doesn't, then check if you have high resolution images in your Word document. I have converted very large DOC files to PDF (without high res images) under 512 MB memory. But, some of the documents, even less than 50 pages, but having large sized images, they require large memory, even upto 3GB!!
Possible solutions:
- Replace the images inside your document using Aspose.Words with smaller, resized images
- If the document has multiple sections, split the document by section and convert to PDF separately. This would of course later require the merging of PDF files.
I work as a Developer/Evangelist at Aspose.