Big PDF size comparing to Excel size

Hi

We have an Excel file of 4 Meg and we get 286 Mega of PDF after rendering to PDF.
Why such big size?
I am using the latest java version 23.7

@elie.kach,

Could you please zip and attach the Excel file here? We will check your issue soon.

Sc18295346_Columbus_transfer_to_Toronto_07_24_2023.zip (1.9 MB)
Excel file is uploaded. My code for conversion:
Workbook workbook = new Workbook(sourceFile);
workbook.calculateFormula();
PdfSaveOptions opts = new PdfSaveOptions();
opts.setOnePagePerSheet(false);
opts.setAllColumnsInOnePagePerSheet(true);
workbook.save(outputFile, opts);

@elie.kach,

Thank you for sharing the sample file with me. I tested your scenario using your template Excel file and found the issue, as you described. It is normal to get a PDF file that is over 200 MB in size using your Excel file because there are many pages to be rendered, especially for the “HS Classifications” worksheet. Additionally, there are some unnecessary blank formatted pages with no data that need to be rendered for some other sheets. Even when I saved the file to PDF via MS Excel manually, it took a long time to render the PDF file, and the output PDF size was also large.

Regardless, we need to evaluate your issue in detail to see if we can do something to minimize the size of the output PDF. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSJAVA-45569

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@elie.kach

I checked your source file in Excel, there are more than 9600 pages. It is reasonable to generate a pdf file that is over 200 MB. Also, I found that there are many cells only have borders/background/formulas, if you don’t want to output these cells to pdf, you need to set proper print area at sheets.