Dear support,
when converting Excel files (*.xlsx) into PDF files using the Aspose.Cells component, in some cases the file size (and processing time) grows enormously.
I’ll attach a sample project containing 3 xlsx files with anonymized data. (I had to replace the content with random strings, due to sensitive data, but the issue doesn’t change with the altered data.)
All of these files have been converted to PDF using 3 different methods:
- Using Excel (Microsoft® Excel® for Microsoft 365 MSO (Version 2502 Build 16.0.18526.20168) 64-bit) and “Print to PDF”
- Using Excel and “Save as ‘*.pdf’”
- Using the provided console application (C#, .NET Framework v4.8, Aspose.Cells 2025.03)
The corresponding file sizes are as follows:
xlsx | Excel Print to PDF | Excel Save as pdf | Aspose.Cells | ||||
---|---|---|---|---|---|---|---|
Filename | KB | KB | multiple of xlsx | KB | multiple of xlsx | KB | multiple of xlsx |
Anonymized_Data1 | 118 | 316 | 2.68 | 374 | 3.17 | 340 | 2.88 |
Anonymized_Data2 | 2080 | 6233 | 3.00 | 9801 | 4.71 | 66249 | 31.85 |
Anonymized_Data3 | 19 | 372 | 19.58 | 71 | 3.74 | 30 | 1.58 |
Predictably PDFs aren’t quiet as efficient in storing data as an Excel sheet is, so I was expecting some increase in file size either way, but increasing from 2MB to 66MB for the second file seems a bit excessive. This increases the file size by more than 30 fold.
In the original excel sheet, which again, I am not allowed to hand out, the difference was even more obvious with an increase from 1.2MB (xlsx) to 67MB of PDF; which is an increase by almost 55 fold.
Could you please investigate this enormous increase in file size and either provide any comprehensible reasoning for this drastic increase in file size or even better implement a fix to keep PDF file sizes to a necessary minimum?
Not all conversion have this issue though, as shown in the above table, for file #3 you even outperform the file sizes generated by both Excel functions.
excel_to_pdf_file_size.zip (3.3 MB)
Unfortunately, I had to skip the PDF documents of the second file, because of upload file size restrictions. I’m sure though, you’ll be able to recreate the massive file size when executing the given console application!
Btw.: Your upload dialog, when posting, displays a limit of 48.8MB, but it wasn’t even accepting 14.8MB.