Excessive memory usage when converting Excel to PDF

Hi

I can’t convert the attached xlsx file to PDF. The process just uses all available memory on the computer and the conversion never ends.

Many thanks,
Dejan

Hi,

Thanks for the sample file.

I can notice the issue regarding memory usage while converting the template file to PDF.

I have logged a ticket with an id: CELLSNET-40317. We will look into it to figure it out soon.

Thank you.

Hi,

After further investigation of your issue, we come with the findings. Please set the Print area for worksheet List1, we see there are large dirty data behind column J, when I use Excel's print preview for the sheet, it shows 116517 pages that are needed to print. So, that will cause large memory usage when converting to PDF.

Hope, you understand it now.

Hi,



thanks for the information. I also got nearly 150 thousand pages to
print. But even if I delete all columns with dirty data from J on, it
has lowered the number of pages in print preview only to 83 thousand. So there still remains the problem with table style.

Hi,


We have investigated your issue further and found there is still some performance issue for getting style of the list object. We have reopened your issue again and we will look into it soon. Once we have any update about it, we will let you know here.

Thank you.

Hi,

Please download and try this fix: Aspose.Cells for .NET (Latest Version)

If you want to change the pages to print in Ms Excel, please set the print area of
the worksheet.

See the following sample code.

C#


Workbook currentWorkbook = new Workbook(@“D:\fileTemp\Templates.xlsx”);

Worksheet sheet = currentWorkbook.Worksheets[0];

int maxRow = sheet.Cells.MaxDataRow;

int maxColumn = sheet.Cells.MaxDataColumn;


sheet.PageSetup.PrintArea = “A1:” + CellsHelper.CellIndexToName(maxRow, maxColumn);

currentWorkbook.Save(@“D:\fileTemp\dest.xlsx”);

Hi,

I tested this fix and it works. Thank you.

But I noticed a little bug. Those red and yellow lines in the Excel file keep their color in PDF only if they are on white (table style) lines. If they are on pink lines they become pink in PDF.

Thanks,
Dejan

Hi,


I could not find the issue with your previous “Templates.xlsx” file, please attach your template file and output pdf file. Also attach the screen shots encircling with red color the problematic areas in the PDF file to show the issue, we will check it soon.

Thank you.

Hi,

here are the excel input file nad PDF output file. If you open them on the first page it’s clearly visible that the excel file has a few more yellow lines than the PDF file. Some of them changed to pink when converting to PDF. Similar with the red lines.

Hi,


Thanks for pointing it out.

Yes, I can notice this issue now. Also the header text color is black but it comes as white in the PDF file.


We have reopened the issue and we will look into it soon.

Thank you.
Hi,

Please try the attached version, we have fixed your issue.

Thank you.

Hi,

now it works great.

Thank you, Dejan

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


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