Pdf like Excel

Hello,
we are saving a workbook to PDF file and we noticed Aspose tend to put as much columns as possible (but not all) on the same page reducing the font size, even if the PDFSaveOptions.AllColumnsInOnePagePerSheet is set to false.

Microsoft Excel, on the same situation, keeps the original font size and split in many pages.

How can we make the pdf as much similar as possible to the one Excel would generate?

any help would be appreciated
thank you
Cesare

@cesare76,

Generally, Aspose.Cells works the same way as MS Excel when rendering to PDF. Could you please zip and attach the Excel file here so that we can evaluate your issue on our end and assist you accordingly?

Saving as pdf the attached xlsx, we obtain a ten pages pdf document while using this the pages are twelve.

master.zip (10.3 KB)

thank you

@cesare76,

Thanks for the template Excel file.

Which version of the API you are using? I used our latest version/fix, Aspose.Cells for .NET v23.8 / Aspose.Cells for Java v23.8 with the following sample code (C# and Java) using your template file and it works as expected, just like MS Excel:
e.g.
Sample code:
[C#.NET]

Workbook workbook = new Workbook("g:\\test2\\master.xlsx");
workbook.Save("g:\\test2\\out1.pdf");

[Java]

Workbook workbook = new Workbook("g:\\test2\\master.xlsx");
workbook.save("g:\\test2\\out1.pdf");

Please find attached the output PDF file for your reference.
out1.zip (34.1 KB)

@amjad.sahi
our application uses Aspose.Cells and Aspose.Pdf 22.4 but in my tests I used the converter available here, which, I guess, uses the last available version.
Anyway, it is not so important, because I also obtain a pdf exactly like the out1.pdf you attached. The problem is that using the MS Excel I obtain something different (12 pages vs 10 pages). Please have a look at the two attached pdf. They are both from the master.xlsx previously attached.
thank you so much for your patience
cesare
pdf.zip (167.1 KB)

@cesare76
By using sample files for testing, we can reproduce the issue. Found that the generated result file has more pages than the Excel generated file when converting the file to pdf format.
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-45595

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.

@cesare76,

I guess different Excel versions display/render differently. I used MS Excel 2019 and it also renders 12 pages similar to Aspose.Cells. See the screenshot attached to display the print preview for your reference.
sc_shot_MS_Excel_2019.png (80.4 KB)

Anyways, since we have already logged a ticket (“CELLSJAVA-45595”) for it, so please spare us little time to evaluate your issue in details. We will get back to you soon with more updates on it.

@cesare76,

I also get 12 pages in Excel with Windows display settings 100%.

Please try to set Windows display settings to 100%, then reboot Windows, and check pages again in Excel.

Currently, we follow 100% display settings while converting workbook to pdf.