Out of Memory Exception Converting Doc to PDF


#1

We had an issue with aspose 14.6.0.0 jar version while converting the big size(more than 1 MB) .doc file into PDF file which cause OOM in the server during the conversion of doc to PDF . We have change the aspose 18.12 .Java version. But still we are getting the Out of Memory error .Could you please check with the aspose team on the latest version jar which has resolved the OOM issue on converting the doc to PDF file.


#2

@YaseenJinnah,

Thanks for providing us details.

Please zip your (input) document (more than 1 MB .doc file) which you are trying to convert to PDF and attach it here. We will check your issue soon.


#3

Hi Amjad ,

As we have some policy issue in sharing the document . When we try to convert the 1475.5 MB of word document into PDF we have issue while conversion in the Server we are using Websphere server where the application is being deployed. Please let me know if you have any questions.


#4

@YaseenJinnah,

Well, a document can take up to ten times or more memory of its original size depending upon the complexity of the document. If a document is more complex, it can take even more than that.

If you are converting a document with size “1475.5 MB”, kindly make sure that you have sufficient memory for the big process. We also recommend you to kindly try our latest version/fix: Aspose.Words v19.6.

If you still find the issue using Aspose.Words v19.6, I am afraid to evaluate your issue properly, we need your document. Without your document, we cannot figure out your issue. Please zip your document and upload to some file sharing service (e.g Dropbox, Google drive, etc.) and share the Download link, we will check it soon.


#5

Hi Amjad ,

We had an issue with aspose 14.6.0.0 jar version while converting the big size(more than 1 MB) .doc file into PDF file which cause OOM in the server during the conversion of doc to PDF . We have change the aspose 18.12 .Java version. But still we are getting the Out of Memory error, Even for 1.4 MB or 2.10 MB files not able to convert from Word (.doc / .docx) to PDF format.

As you have mentioned in the below mail depending on the Complexity of the document – What is the complexity of the document referred here.

What is the latest fix for the particular issue related to OOM is been updated in the Aspose.Words v19.6 ? Whether the latest version Aspose.Words v19.6 will resolve the OOM issue while converting the doc to PDF of More than 1 MB file.

Incase if we want to use the latest version of Aspose.Words v19.6 , the license which we bought for the other version can be used with the latest jar.

Please let me know if you have any queries.


#6

Hi Amjad ,

When we analysis on the heap dump of the server where we could find that for processing a document conversion to PDF of (1.40 MB) file it has utilizing around (.5 GB) of memory from the server JVM and not releasing the memory.

Aspose.JPG (55.5 KB)

Regards,
Yaseen


#7

@YaseenJinnah,

We have just released a new version of Aspose.Words for Java i.e. 19.7. Can you please try the latest version and see how it goes on your end? In case the problem still remains, please ZIP and upload your input Word document (you are getting this problem with) here for testing. We will then investigate the issue on our end and provide you more information.

P.S. You can also upload the ZIP file to Dropbox and share the Download link here for testing.


#8

Hi Awais ,

We have already upgrade the version for the same issue (OOM Issue in the JVM) from 14.6.0 to 18.12. As per the Aspose suggestion we have change the version of the jar due to the OOM issue but still we are facing the same issue after changing the jar. As we have already asked couple of question in the forum. Could you please address the questions.

As you have mentioned in the below mail depending on the Complexity of the document – What is the complexity of the document referred here.

What is the latest fix for the particular issue related to OOM is been updated in the Aspose.Words v19.6 ? Whether the latest version Aspose.Words v19.6 will resolve the OOM issue while converting the doc to PDF of More than 1 MB file.


#9

@YaseenJinnah,

We fix many issues and implement new features in each monthly release of Aspose.Words which you can check in Aspose.Words’ Release Notes section.

Simple documents can contain text only, while complex documents may contain tables, math equations, shapes, group shapes, fields (TOC etc), Smart arts, and many more elements.

Unfortunately, it is difficult to say what the problem is without your document. We need your document to reproduce the same problem on our end. It is safe to attach files in the forum. If you attach your document here, only you and Aspose staff members can download it. You can also remove any sensitive information by replacing it with dummy data instead.


#10

Hi Awais ,

Does the complex document will take more memory than the Simple document. As mentioned in your earlier that processing / converting doc to PDF will take 10 times memory for the process. We are assuming that simple document will take 10 times memory , Complex document will also same take the same amount of memory. Please let us know.

Regards,
Yaseen


#11

@YaseenJinnah,

Simple and complex documents can take up different amounts of memories. Generally, Aspose.Words needs 10 times more memory than the original document size to build it’s DOM in the memory and when it comes to rendering a document to fixed page formats (e.g. PDF), Aspose.Words needs to build two model in the memory – one for document and the other for rendered document. So, logically there are two document models in memory. That is why Aspose.Words utilizes more memory when you render a document (to PDF) than when you simply save a document in flow formats (e.g DOCX).

P.S. It is better to use few small documents instead of one huge document.