PageSetup

Overview

PageSetup is a class in Aspose.Words FOSS for .NET. Inherits from: IBorderAttrSource.

Represents the page setup properties of a section.

This class provides 1 method for working with PageSetup objects in .NET programs. Available methods include: ClearFormatting. All public members are accessible to any .NET application after installing the Aspose.Words FOSS for .NET package. Properties: Bidi, BorderAlwaysInFront, BorderAppliesTo, BorderDistanceFrom, BorderSurroundsFooter, BorderSurroundsHeader, and 39 more.

Properties

NameTypeAccessDescription
OddAndEvenPagesHeaderFooterboolRead/WriteTrue if the document has different headers and footers for odd-numbered and even-numbered pages.
DifferentFirstPageHeaderFooterboolRead/WriteTrue if a different header or footer is used on the first page.
MultiplePagesMultiplePagesTypeRead/WriteFor multiple page documents, gets or sets how a document is printed or rendered so that it can be bound as a booklet.
SheetsPerBookletintRead/WriteReturns or sets the number of pages to be included in each booklet.
SectionStartSectionStartRead/WriteReturns or sets the type of section break for the specified object.
SuppressEndnotesboolRead/WriteTrue if endnotes are printed at the end of the next section that doesn’t suppress endnotes.
VerticalAlignmentPageVerticalAlignmentRead/WriteReturns or sets the vertical alignment of text on each page in a document or section.
BidiboolRead/WriteSpecifies that this section contains bidirectional (complex scripts) text.
LayoutModeSectionLayoutModeRead/WriteGets or sets the layout mode of this section.
CharactersPerLineintRead/WriteGets or sets the number of characters per line in the document grid.
LinesPerPageintRead/WriteGets or sets the number of lines per page in the document grid.
PageWidthdoubleRead/WriteReturns or sets the width of the page in points.
PageHeightdoubleRead/WriteReturns or sets the height of the page in points.
MarginsMarginsRead/WriteReturns or sets preset Margins of the page.
PaperSizePaperSizeRead/WriteReturns or sets the paper size.
OrientationOrientationRead/WriteReturns or sets the orientation of the page.
LeftMargindoubleRead/WriteReturns or sets the distance (in points) between the left edge of the page and the left boundary of the body text.
RightMargindoubleRead/WriteReturns or sets the distance (in points) between the right edge of the page and the right boundary of the body text.
TopMargindoubleRead/WriteReturns or sets the distance (in points) between the top edge of the page and the top boundary of the body text.
BottomMargindoubleRead/WriteReturns or sets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text.
HeaderDistancedoubleRead/WriteReturns or sets the distance (in points) between the header and the top of the page.
FooterDistancedoubleRead/WriteReturns or sets the distance (in points) between the footer and the bottom of the page.
GutterdoubleRead/WriteGets or sets the amount of extra space added to the margin for document binding.
FirstPageTrayintRead/WriteGets or sets the paper tray (bin) to use for the first page of a section.
OtherPagesTrayintRead/WriteGets or sets the paper tray (bin) to be used for all but the first page of a section.
HeadingLevelForChapterintRead/WriteGets or sets the heading level style that is applied to the chapter titles in the document.
ChapterPageSeparatorChapterPageSeparatorRead/WriteGets or sets the separator character that appears between the chapter number and the page number.
PageNumberStyleNumberStyleRead/WriteGets or sets the page number format.
RestartPageNumberingboolRead/WriteTrue if page numbering restarts at the beginning of the section.
PageStartingNumberintRead/WriteGets or sets the starting page number of the section.
LineNumberRestartModeLineNumberRestartModeRead/WriteGets or sets the way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously.
LineNumberCountByintRead/WriteReturns or sets the numeric increment for line numbers.
LineNumberDistanceFromTextdoubleRead/WriteGets or sets distance between the right edge of line numbers and the left edge of the document.
LineStartingNumberintRead/WriteGets or sets the starting line number.
TextColumnsTextColumnCollectionReadReturns a collection that represents the set of text columns.
RtlGutterboolRead/WriteGets or sets whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language.
BorderAlwaysInFrontboolRead/WriteSpecifies where the page border is positioned relative to intersecting texts and objects.
BorderDistanceFromPageBorderDistanceFromRead/WriteGets or sets a value that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds.
BorderAppliesToPageBorderAppliesToRead/WriteSpecifies which pages the page border is printed on.
BorderSurroundsHeaderboolRead/WriteSpecifies whether the page border includes or excludes the header.
BorderSurroundsFooterboolRead/WriteSpecifies whether the page border includes or excludes the footer.
BordersBorderCollectionReadGets a collection of the page borders.
FootnoteOptionsFootnoteOptionsReadProvides options that control numbering and positioning of footnotes in this section.
EndnoteOptionsEndnoteOptionsReadProvides options that control numbering and positioning of endnotes in this section.
TextOrientationTextOrientationRead/WriteAllows to specify TextOrientation for the whole page.

Methods

SignatureDescription
ClearFormatting()Resets page setup to default paper size, margins and orientation.

See Also