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

Free Support Forum - aspose.com

Get section attributes?

After setting attributes on a section (SetSectionAttr), how do you get these attributes?

@robschenkel

Thanks for your inquiry. You can use different section properties for the purpose e.g. PageSetup to set and get different attributes of page setup of section. Please check following sample code snippet for reference. However, if there is some difference in your requirements and our understanding then please share some more details. So we will guide you accordingly.

Document doc = new Document(@"Input.docx");
Aspose.Words.Section section = doc.FirstSection;
section.PageSetup.Orientation = Orientation.Landscape;

PageSetup ps = section.PageSetup;
Console.WriteLine("left margin:" + ps.LeftMargin);
Console.WriteLine("Section orientation:" + ps.Orientation);