Aspose.Cells Different scale printed to Excel and Pdf

Hi, I’m using Aspose.Cells to generate a report file from a custom Excel template. The problem is, when I print it to Excel format (report_aspose.xlsx), the last line from each page is overflowed, which is supposed to be correct since it happens the same in the template. But somehow when I print it to Pdf format, the overflow issue doesnt happen at all. When I convert Excel file to Pdf via Adobe printer, the line in Pdf is overflow, and also the overall scale of this Pdf file (report_adobe_print.pdf) seems to be different from the Pdf file generated by Aspose.Cells (report_aspose.pdf), as the row width and column height from the latter seems to be smaller. Even when I change the template file so that overflow doesn’t happen, the scale is still different.
I want to ask whether Aspose has some mechanics to automatically change the scale when printed in Pdf format? If yes, how can I config it?

Version used: Aspose.Cells for Java, ver22.8
Sample code:
Excel format:

		try {
			this.workbook.save(outputStream, SaveFormat.XLSX);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}

Pdf format:

		try {
			this.workbook.save(outputStream, SaveFormat.PDF);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}

reports.zip (2.7 MB)

@m16vip123

While convering to pdf, Excel may do some scaling on horizontal and vertical direction. Aspose.Cells also do the similar scaling to get the same output as Excel. This is not configurable.

We can reproduce the issue as you said, the scaling of Aspose.Cells generated pdf is different with the one saved by Excel. 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-45779

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.

1 Like

@m16vip123,

We are pleased to inform you that your issue has been resolved. The fix will be included in the upcoming release (Aspose.Cells v24.1) that we plan to release in the first half of January 2024. You will be notified when the next version is released.

The issues you have found earlier (filed as CELLSJAVA-45779) have been fixed in Aspose.Cells for Java 24.1.