We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Saving to PDF consumes all system memory

We have encountered a spreadsheet that has a large number of extra rows with formatting, but very little actual data. When attempting to save this spreadsheet to PDF, all memory in the system is consumed.

While it is possible to call sheet.Cells.DeleteBlankRows() to avoid this, I am concerned that there is far too much memory consumed when saving to PDF with cell formatting. Take the attached spreadsheet and try to save it to a PDF.

var workbook = new Aspose.Cells.Workbook(filePath);
workbook.Save(Path.GetTempFileName(), Aspose.Cells.SaveFormat.Pdf);

Hi Barry,

Thank you for using Aspose products.

You are right, as I was able to experience the System.OutOfMemoryException while converting your provided spreadsheet to PDF. Please note, I have used below provided code snippet with latest build of Aspose.Cells for .NET You may observe from the code snippet that PrintingPageType is set to ignore the blank cells but still System.OutOfMemoryException pops up. I have logged an investigative ticket (CELLSNET-42278) in our bug tracking system to look further into this matter. Please spare us little time to properly analyze the problem cause, and to provide a fix (if applicable). In the meanwhile, we will keep you posted with updates in this regard.


var workbook = new Aspose.Cells.Workbook(myDir + “emptyformat.xlsx”);
var options = new PdfSaveOptions();
options.PrintingPageType = PrintingPageType.IgnoreBlank;
workbook.Save(myDir + “out.pdf”, options);


Please try our latest version/fix: Aspose.Cells for .NET v8.0.1.4 / Aspose.Cells for Java v8.0.1.4

With the new fix v8.0.1.4(.NET/JAVA) Memory issue should be solved. Although the performance
has been improved by the new fix when comparing with old ones, certain time is still needed for the process of generating PDF file because there are too
many pages generated for the resultant PDF.

Let us know your feedback.

Thank you.

The issues you have found earlier (filed as CELLSNET-42278) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.