Excel To PDF

I am converting a Excel to PDF. I notices the PDF is always larger then the excel. is there any way to change that? Also I notices the excel spreadsheet is chunked into pages by default. Is there any way to set the amount of rows per PDF page?

Hi Sadi,


Thank you for contacting Aspose support.

Could you please elaborate, what do you mean by “PDF is always larger then the Excel”? It would be of great help in understanding the concerns if you can share a few samples to support. Please note, Aspose.Cells will render the spreadsheet to PDF as it is displayed in the Excel’s Print Preview by default. However, the rendering process is configurable, that means; you can influence the rendering process to some extent. For instance, you may use PdfSaveOptions.OnePagePerSheet property to render all contents of one Worksheet to one PDF page or PdfSaveOptions.AllColumnsInOnePagePerSheet property to render all columns of one Worksheet to one PDF page. Unfortunately, there is no such property that could allow you to control the rendering process row wise as per your requirement.

Please share your sample spreadsheet and number of rows that you wish to render on one page of PDF, we will review it to provide a solution for your requirement.

Edited: You may also try inserting horizontal page breaks on row where you wish to break the page. See a detailed article on managing page breaks with Aspose.Cells for .NET API.