Print area is not honored

Hello,

We are experiencing PDF export differences when rendering with Aspose.Cells. Excel document which has Print Area specified is being rendered differently compared with Excel print. It does not matter if we select Letter or A4 page size, Print Area is not being honored.

Even setting paper size explicitly does not fix the problem:
foreach (var sheet in workbook.Worksheets)
{
if (sheet.IsVisible)
{
var pageSetup = sheet.PageSetup;
pageSetup.PaperSize = PaperSizeType.PaperLetter;
}
}

Thanks

@dennis.abreo

You reported that the print area specified in an Excel document is not being honored during PDF export with Aspose.Cells, even after explicitly setting the paper size . Your code attempts to set the paper size using PageSetup.PaperSize, but this does not resolve the issue .

This issue has been reported by users, and it appears Aspose.Cells does not fully respect the print area settings when exporting to PDF . The print area defined in Excel is not consistently applied during the PDF rendering process, leading to differences between the Excel print preview and the exported PDF.

To work around this, you may need to manually define the print area using the PageSetup.PrintArea property before exporting to PDF:

foreach (var sheet in workbook.Worksheets)
{
 if (sheet.IsVisible)
 {
 var pageSetup = sheet.PageSetup;
 pageSetup.PaperSize = PaperSizeType.PaperLetter;
 // Define the print area explicitly if needed
 pageSetup.PrintArea = "A1:D10"; // Replace with actual range
 }
}

A support engineer will follow up in this thread if needed.

@dennis.abreo,

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

TestDocs.zip (795.2 KB)

Please see test documents attached.
More details on this, there is already PrintArea specified (checked while debugging).

@dennis.abreo,

Thanks for the template Excel file and output PDF files.

I tested your scenario using the provided template Excel file and noticed an issue with the output PDF document. Upon further evaluation, I found that the “Finlandica” font is not being used in the output PDF. It seems this font is not installed on your system. Please install the “Finlandica” font and try your scenario again—it should resolve the issue.

Additionally, the “Finlandica” font is not installed on my system either, so I was unable to test it thoroughly. Please note that the fonts used in the workbook are essential for rendering spreadsheets to PDF or images. You can refer to this document for more details: Configuring Fonts for Rendering Spreadsheets|Documentation. If Aspose.Cells cannot locate a specific font, it will substitute it with a similar font available on the machine.

If the issue persists, kindly compress and share the “Finlandica” font (.ttf files) with us, and we will investigate further.

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): CELLSNET-59766

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.

@dennis.abreo ,

Do you mean that the page break in Aspose generated pdf is different with the one generated by Microsoft Excel?

The printview in Excel is different on Windows with different system display settings. Aspose.Cells takes the printview in Excel on Windows with system display settings setting to 100% scale as the rule.
ForInvestigation_saved_by_Excel_system_100scale.pdf (206.9 KB)

We will fix the page break issue.

@dennis.abreo,

This is to inform you that your issue (Issue ID: “CELLSNET-59766”) has been resolved. This fix will be included in the upcoming Aspose.Cells v26.2, expected to be released in the first half of February 2026. We will notify you as soon as the new version is released.

The issues you have found earlier (filed as CELLSNET-59766) have been fixed in this update. This message was posted using Bugs notification tool by leoluo

Thanks a lot !

@dennis.abreo,

You are welcome. We hope the new version resolves the issue and meets your expectations. Please do not hesitate to reach out to us at any time with any further questions or feedback.