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

Free Support Forum - aspose.com

Convert html to pdf and output in landscape mode?

my app is very simple like below
Aspose.Words.Document doc = new Aspose.Words.Document( some stream );
doc.SaveToPdf(…);

is there a way to output this pdf in landscape mode? thx

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. If you would like to set page orientation for your input document programmatically and then convert to PDF, please try using the following code:

Document doc = new Document(@"Test100\in.docx");

// Set Orientation for each sections

foreach (Section section in doc.Sections)

{

section.PageSetup.Orientation = Orientation.Landscape;

}

doc.SaveToPdf(@"Test100\out.pdf");

Best regards,

that worked, thanks a lot