Conversion of excel file with graph controls to PDF is very slow

Conversion of 1000 excel files with 4 graph controls to pdf taking long time . conversion of xls file took 7 hours and xlsx took 11 hours (with same content). Ms office version is 2003. Sample file is attached. We are using Aspose.Cells(Ver. 7.1.2.6). Please provide optimize processing speed if possible. Is there any other settings I can do to improve this performance?


Code snippet:
Workbook workbook = new Workbook(sourceFilePath);
workbook.Save(destinationFilePath, Aspose.Cells.SaveFormat.Pdf);

Thanks
Viral
Hi,

Please download and use the latest version: Aspose.Cells for .NET (Latest Version) if it makes any difference.

Also, I think you may try to set SaveOptions.CachedFileFolder while saving the workbook/file to PDF. When this option is not set, we have to save something to memory first, then save to the file. Setting this option will directly save to the file.



Does it makes any change from functionality point of view ? What would be impact in terms of memory and processor? Can you please provide rough figures if you have any for the given file and parameters? I need difference of using CachedFileFolder parameter. I think this will fix issue of RAM consumption but not sure how processing time will be improved with this change.

Hi,

After looking into your issue, we found that the chart is complex with 5000+ polylines and each chart will render 3 times for it is divided into 3 parts, so it needs more time to convert

So, we suggest you to use

C#


PdfSaveOptions pso = new PdfSaveOptions(SaveFormat.Pdf);

pso.ImageType = ImageFormat.Png;


It will save much time.

or try to make each chart rendered in one page.

What are the side effects of using your code snippet ? What is default image type and why not default?

Hi,

Thanks for your question and using Aspose.Cells.

By default we convert chart into pdf as vector drawing with highest quality, if you will use the code snippet as given to you, the chart will be converted as png and it saves much time when chart is complex but it gives a lower quality.

What are other imagetypes ? Why not Jpeg ? If image type is PNG then pdf size will be bigger in size?

Hi,


We will soon get back to you to provide you technical details/info about your queries.

Thank you.

Hi,

Jpeg can not support transparency, so we do not use JPEG in PDF.