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

Free Support Forum - aspose.com

How to get page orientation from a word document in Aspose c#

I have word document where pages are with different orientation portrait or landscape
I want to identify the orientation prophetically

Rasmi Ranjan Mishra


Thanks for your query.

I am moving your thread to Aspose.Words forums where one of my fellow colleagues from Aspose.Words team will help you soon.


Thanks for your inquiry. Please use PageSetup.Orientation property to get or set the orientation of the page. Please check the following code example.

Document doc = new Document(MyDir + "in.docx");

foreach (Section section in doc.Sections)