I have a problem with Worksheet.GetPrintingPageBreaks method who gives incorrect area.
For example, the first page is supposed to be A1:C46 but that finds A1:C47. The second page is supposed to be A47:C92 and I got A48:C94.
I note that difference changes when I change margins.
This issue is already reported and logged in our database as follows:
CELLSNET-46257- Incorrect Print page breaks returned by Worksheet.GetPrintingPageBreaks()
Although as per our previous analysis, it is quite difficult to make this calculation exactly same as done by Excel. There is slight difference in calculations done by Aspose.Cells and Excel for calculating this page break but we will let you know if some more feedback is available.
We have noticed that first page area is also C1:G48 by Aspose.Cells and the saved PDF file is also 21 pages. MOCK_DATA2_SavedByAspose.pdf (81.2 KB). It is same as the Excel print preview screenshot “PrintPreview3.png” shared by you.
Please try our latest version/fix: Aspose.Cells for .NET v18.8.3: