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

Free Support Forum - aspose.com

How to make page print Orientation landscape

hi,

how do i make orientation Landscape so when i save as PDF or xls it should print as landscape.

as currently it is bydefault coming as portriat and when i try to save as PDF columns gets cut off.

Is there any settings i can set ??

I have attached code and excel generated file for your reference.

Hi Piyush,


Thank you for contacting Aspose support.

Please use the PageSetup.Orientation property to set desired orientation. Please check the below provided code snippet for your reference.

C#

var book = new Workbook(myDir + “sample.xls”);
var sheet = book.Worksheets[1];
sheet.PageSetup.Orientation = PageOrientationType.Landscape;

Please feel free to write back in case you need our further assistance.