Category / Section
How do I set the document page Orientation?
1 min read
The section1.PageSetup.Orientation property is used to set the document page orientation settings, such as Landscape and Portrait.
C#
// Set the document page as Landscape.
section1.PageSetup.Orientation = PageOrientation.Landscape;
// Set the document page as Portrait.
section2.PageSetup.Orientation = PageOrientation.Portrait;
VB
' Set the document page as Landscape.
section1.PageSetup.Orientation = PageOrientation.Landscape
' Set the document page as Portrait.
section2.PageSetup.Orientation = PageOrientation.Portrait
Here is the sample.