Thetype exposes the following members.
Specifies that this section contains bidirectional (complex scripts) text.
Specifies where the page border is positioned relative to intersecting texts and objects.
Specifies which pages the page border is printed on.
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.
Gets a collection of the page borders.
Specifies whether the page border includes or excludes the footer.
Specifies whether the page border includes or excludes the header.
Returns or sets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text.
Gets or sets the number of characters per line in the document grid.
True if a different header or footer is used on the first page.
Provides options that control numbering and positioning of endnotes in this section.
Gets or sets the paper tray (bin) to use for the first page of a section. The value is implementation (printer) specific.
Returns or sets the distance (in points) between the footer and the bottom of the page.
Provides options that control numbering and positioning of footnotes in this section.
Gets or sets the amount of extra space added to the margin for document binding.
Returns or sets the distance (in points) between the header and the top of the page.
Gets or sets the layout mode of this section.
Returns or sets the distance (in points) between the left edge of the page and the left boundary of the body text.
Returns or sets the numeric increment for line numbers.
Gets or sets distance between the right edge of line numbers and the left edge of the document.
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.
Gets or sets the number of lines per page in the document grid.
Gets or sets the starting line number.
For multiple page documents, gets or sets how a document is printed or rendered so that it can be bound as a booklet.
True if the document has different headers and footers for odd-numbered and even-numbered pages.
Returns or sets the orientation of the page.
Gets or sets the paper tray (bin) to be used for all but the first page of a section. The value is implementation (printer) specific.
Returns or sets the height of the page in points.
Gets or sets the page number format.
Gets or sets the starting page number of the section.
Returns or sets the width of the page in points.
Returns or sets the paper size.
True if page numbering restarts at the beginning of the section.
Returns or sets the distance (in points) between the right edge of the page and the right boundary of the body text.
Gets or sets whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language.
Returns or sets the type of section break for the specified object.
Returns or sets the number of pages to be included in each booklet.
True if endnotes are printed at the end of the next section that doesn't suppress endnotes. Suppressed endnotes are printed before the endnotes in that section.
Returns a collection that represents the set of text columns.
Returns or sets the distance (in points) between the top edge of the page and the top boundary of the body text.
Returns or sets the vertical alignment of text on each page in a document or section.
Resets page setup to default paper size, margins and orientation.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Serves as the default hash function.(Inherited from Object.)
Gets the Type of the current instance.(Inherited from Object.)
Returns a string that represents the current object.(Inherited from Object.)
PageSetup object contains all the page setup attributes of a section (left margin, bottom margin, paper size, and so on) as properties.
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); // Modify the page setup properties for the builder's current section and add text. builder.PageSetup.Orientation = Orientation.Landscape; builder.PageSetup.VerticalAlignment = PageVerticalAlignment.Center; builder.Writeln("This is the first section, which landscape oriented with vertically centered text."); // If we start a new section using a document builder, // it will inherit the builder's current page setup properties. builder.InsertBreak(BreakType.SectionBreakNewPage); Assert.AreEqual(Orientation.Landscape, doc.Sections.PageSetup.Orientation); Assert.AreEqual(PageVerticalAlignment.Center, doc.Sections.PageSetup.VerticalAlignment); // We can revert its page setup properties to their default values using the "ClearFormatting" method. builder.PageSetup.ClearFormatting(); Assert.AreEqual(Orientation.Portrait, doc.Sections.PageSetup.Orientation); Assert.AreEqual(PageVerticalAlignment.Top, doc.Sections.PageSetup.VerticalAlignment); builder.Writeln("This is the second section, which is in default Letter paper size, portrait orientation and top alignment."); doc.Save(ArtifactsDir + "PageSetup.ClearFormatting.docx");