Articles in this section
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 like 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.

Page_Orientation.zip

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied