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

Free Support Forum - aspose.com

Excel > PDF Conversion Issues

Hi,

I have attached a simple Excel file. I try to convert to PDF and some of the columns break to the next page. Is it possible to have the same look as in Excel. I mean all the columns should come horizontally instead of going to next page

Regards,

Pavi

Hi Pavi,

Please check the printview of the file in MS Excel, you will see MS Excel will print the file to the two pages. Cells2Pdf works as MS Excel printing.

If you want to print it in a page width, please set the page setup. See following codes:

Workbook workbook = new Workbook();
workbook.Open(@"F:\FileTemp\test.xls");
Worksheet sheet = workbook.Worksheets[0];
sheet.PageSetup.FitToPagesWide = 1;
sheet.PageSetup.FitToPagesTall = 1;

//save the workbook to pdf