Excel to PDF in Java - Aspose.PDF is throwing OutOfMemoryError Exception

Do we have the update now?

Thanks,
Harish

@HThagunna

Regretfully, your issue is still pending for resolution. Please note that it was logged under free support model where issues have low priority and are resolved on first come first basis. We will definitely let you know as soon as we have some definite updates regarding its resolution. Please spare us little time.

We are sorry for the inconvenience.

Any update now?

Thanks,
Harish

@HThagunna

Your issue i.e. PDFJAVA-38858 is still pending for a resolution. However, investigation of this ticket is underway and we will surely inform you as soon as we have some results. Please spare us little time.

We are sorry for the inconvenience.

Do we have any update here?

Thanks,

@HThagunna

Regretfully the ticket is not resolved yet as it needs additional investigation and there are other high priority issues in the queue as well. However, as a temprary solution, convert pdf->docx on separated pages. Such conversion takes 20 minutes for all the 2225 pages:

 try {
            Document finalOutput = new Document(dataDir + "dstStream.pdf");

            //???
            //finalOutput.getPages().add(finalOutput.getPages());

            DocSaveOptions opts = new DocSaveOptions();
            opts.setFormat(SaveFormat.DocX);
//            finalOutput.save(dataDir + "output.docx", opts); // this part is taking time

            PageCollection pages = finalOutput.getPages();

            for (int i = 1; i <= pages.size(); i++)
            {
                Document temp_doc = new Document();
                temp_doc.getPages().add(pages.get_Item(i));
                temp_doc.save(dataDir + "tmp\\" +i+"_Converted.docx",opts);
                System.out.println("Converted page - " + i);
                printMemoryStatus();
            }


        } catch (Exception ex) {
            ex.printStackTrace();
        }

Additional question is for the code line: finalOutput.getPages().add(tempDocument.getPages());
This will duplicates all the pages, so this line is probably mistake.

Ok Thanks.

But this seems time consuming. Please prioritize PDFJAVA-38858 as well. Our clients are waiting for this issue to be fixed since more than 8 months.

Thanks,
Harish

@HThagunna

We already have prioritize the issue despite being logged in normal support model. However, initial investigation showed that it requires certain amount of time to get completely resolved and there are other high priority issues in the queue pending for the resolution. We will surely consider your concerns during issue investigation and will inform you as soon as it is resolved. We greatly appreciate your patience and comprehension in this matter.

We are sorry for the inconvenience.

1 Like

Sure. Thanks.

Asad, We tried the approach you sent but this altered the layout of the elements like charts, alignment of contents within a cells etc. So, we have reverted this.

If there’s any other approach. Please suggest.

Thanks,

@HThagunna

Regretfully there is no other alternative approach to this problem and we cannot offer any workaround as long as the ticket is not fully investigated. The issue is currently under analysis stage and as soon as we have some significant updates regarding its resolution, we will surely inform you. Please spare us some time.

We are sorry for the inconvenience.

This topic has been moved to the related forum: https://helpdesk.aspose.com , logged as Ticket #174489

The issues you have found earlier (filed as PDFJAVA-38858) have been fixed in Aspose.PDF for Java 20.9.