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
| Name | Type | Access | Description |
|---|---|---|---|
OddAndEvenPagesHeaderFooter | bool | Read/Write | True if the document has different headers and footers for odd-numbered and even-numbered pages. |
DifferentFirstPageHeaderFooter | bool | Read/Write | True if a different header or footer is used on the first page. |
MultiplePages | MultiplePagesType | Read/Write | For multiple page documents, gets or sets how a document is printed or rendered so that it can be bound as a booklet. |
SheetsPerBooklet | int | Read/Write | Returns or sets the number of pages to be included in each booklet. |
SectionStart | SectionStart | Read/Write | Returns or sets the type of section break for the specified object. |
SuppressEndnotes | bool | Read/Write | True if endnotes are printed at the end of the next section that doesn’t suppress endnotes. |
VerticalAlignment | PageVerticalAlignment | Read/Write | Returns or sets the vertical alignment of text on each page in a document or section. |
Bidi | bool | Read/Write | Specifies that this section contains bidirectional (complex scripts) text. |
LayoutMode | SectionLayoutMode | Read/Write | Gets or sets the layout mode of this section. |
CharactersPerLine | int | Read/Write | Gets or sets the number of characters per line in the document grid. |
LinesPerPage | int | Read/Write | Gets or sets the number of lines per page in the document grid. |
PageWidth | double | Read/Write | Returns or sets the width of the page in points. |
PageHeight | double | Read/Write | Returns or sets the height of the page in points. |
Margins | Margins | Read/Write | Returns or sets preset Margins of the page. |
PaperSize | PaperSize | Read/Write | Returns or sets the paper size. |
Orientation | Orientation | Read/Write | Returns or sets the orientation of the page. |
LeftMargin | double | Read/Write | Returns or sets the distance (in points) between the left edge of the page and the left boundary of the body text. |
RightMargin | double | Read/Write | Returns or sets the distance (in points) between the right edge of the page and the right boundary of the body text. |
TopMargin | double | Read/Write | Returns or sets the distance (in points) between the top edge of the page and the top boundary of the body text. |
BottomMargin | double | Read/Write | Returns or sets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text. |
HeaderDistance | double | Read/Write | Returns or sets the distance (in points) between the header and the top of the page. |
FooterDistance | double | Read/Write | Returns or sets the distance (in points) between the footer and the bottom of the page. |
Gutter | double | Read/Write | Gets or sets the amount of extra space added to the margin for document binding. |
FirstPageTray | int | Read/Write | Gets or sets the paper tray (bin) to use for the first page of a section. |
OtherPagesTray | int | Read/Write | Gets or sets the paper tray (bin) to be used for all but the first page of a section. |
HeadingLevelForChapter | int | Read/Write | Gets or sets the heading level style that is applied to the chapter titles in the document. |
ChapterPageSeparator | ChapterPageSeparator | Read/Write | Gets or sets the separator character that appears between the chapter number and the page number. |
PageNumberStyle | NumberStyle | Read/Write | Gets or sets the page number format. |
RestartPageNumbering | bool | Read/Write | True if page numbering restarts at the beginning of the section. |
PageStartingNumber | int | Read/Write | Gets or sets the starting page number of the section. |
LineNumberRestartMode | LineNumberRestartMode | Read/Write | Gets 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. |
LineNumberCountBy | int | Read/Write | Returns or sets the numeric increment for line numbers. |
LineNumberDistanceFromText | double | Read/Write | Gets or sets distance between the right edge of line numbers and the left edge of the document. |
LineStartingNumber | int | Read/Write | Gets or sets the starting line number. |
TextColumns | TextColumnCollection | Read | Returns a collection that represents the set of text columns. |
RtlGutter | bool | Read/Write | Gets or sets whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language. |
BorderAlwaysInFront | bool | Read/Write | Specifies where the page border is positioned relative to intersecting texts and objects. |
BorderDistanceFrom | PageBorderDistanceFrom | Read/Write | Gets 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. |
BorderAppliesTo | PageBorderAppliesTo | Read/Write | Specifies which pages the page border is printed on. |
BorderSurroundsHeader | bool | Read/Write | Specifies whether the page border includes or excludes the header. |
BorderSurroundsFooter | bool | Read/Write | Specifies whether the page border includes or excludes the footer. |
Borders | BorderCollection | Read | Gets a collection of the page borders. |
FootnoteOptions | FootnoteOptions | Read | Provides options that control numbering and positioning of footnotes in this section. |
EndnoteOptions | EndnoteOptions | Read | Provides options that control numbering and positioning of endnotes in this section. |
TextOrientation | TextOrientation | Read/Write | Allows to specify TextOrientation for the whole page. |
Methods
| Signature | Description |
|---|---|
ClearFormatting() | Resets page setup to default paper size, margins and orientation. |