Page Orientation

Hi,

When converting from HTML to PDF, how can we set the page orientation we want in the output PDF?

Thanks,
Nitesh

Hi Nitesh,

Thanks for your inquiry. Please use the PageSetup.Orientation property to set the orientation of the page as shown in following code snippet.

Document doc = new Document(MyDir + "in.html");
doc.FirstSection.PageSetup.Orientation = Aspose.Words.Orientation.Landscape;
doc.Save(MyDir + "out.pdf");

Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.