We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Pagination of Excel file changes when creating PDF if Windows display set to 125% of normal

I have a client with one PC that was not scrubbing to a PDF (our Scrub product using Aspose.Pdf for .NET 17.1.0 to output result to PDF) the same as the other PCs.

For example on a spreadsheet with 4 columns that normally fit on a portrait page when printed from Excel, when scrubbed to PDF the 4th column was shifted to the next page as the entire display of the spreadsheet grew larger.

I discovered the PC with the problem had Windows display set to 125% of normal. All the other PCs without this issue have display at 100%. This display change did not affect how Excel paginated pages, but the external command issues to create a PDF with the Aspose driver appears to rely on Windows display.

Is there a command line setting we should be using to insure that Aspose processes an Excel file to PDF using standard resolution or display settings?

Kristen Theologus
Scrub Product Specialist

Hi Kristen,

Thanks for contacting support.

As per my understanding, the above query appears to be related to conversion of Excel file to PDF format and in order to accomplish this requirement, Aspose.Cells is used. Furthermore, can you please share some details regarding scrubbing feature that have implemented using Aspose.Pdf for .NET.

If possible, please share a sample project and input files, so that we can try replicating it in our environment. We are sorry for this inconvenience.

Here is the code we use to save an excel document to pdf:

private Aspose.Cells.Workbook _workbook;

_workbook = new Workbook(_docPath);

_workbook.Save(newFilePath, SaveFormat.Pdf);

Hi Kristen,

Thanks for sharing the sample files.

We are further testing the scenario in our environment and will keep you posted with our findings.


Thanks for the template files.

After an initial test, I observed the issue as you mentioned by first set the Windows display settings to “125%” and then render your template Excel file to PDF via Aspose.Cells APIs. I found that the 4th column (D) in “Metadata Items” sheet is shifted to the next page as the entire display of the spreadsheet grows a bit larger in the output PDF. I also found that the problem is not there with Windows display setting as"100%". For your information, Aspose.Cells renders best results on 100% display settings when rendering to PDF or taking images for the worksheets. Anyways, I have logged a ticket with an id “CELLSNET-45198” for your issue. We will check if we can fix your issue as MS Excel does not depend on display settings when rendering to PDF files.

Once we have an update on it, we will let you know here.

Thank you.


Well, if you want Aspose should process the Excel file to PDF rendering using a standard resolution or display settings, please try to set DPI (e.g CellsHelper.DPI = 96) at the start of your code, it should fix your issue.

Let us know if you still find the issue.

Thank you.

Thank you. We will make that change.