Class PageSetup
- Namespace
- MigraDoc.DocumentObjectModel
- Assembly
- MigraDoc.DocumentObjectModel.dll
Represents the page setup of a section.
public class PageSetup : DocumentObject
- Inheritance
-
objectPageSetup
- Inherited Members
- Extension Methods
Constructors
- PageSetup()
Initializes a new instance of the PageSetup class.
Properties
- BottomMargin
Gets or sets the bottom margin of the pages in the section.
- Comment
Gets or sets a comment associated with this object.
- DefaultPageSetup
Gets a PageSetup object with default values for all properties. User code must not change any value in DefaultPageSetup because these values are the reference used when persisting DOM objects in MDDDL files. Create "Clone()" of DefaultPageSetup and make the necessary changes.
- DifferentFirstPageHeaderFooter
Gets or sets a value which define whether the section has a different first page header and footer.
- EffectivePageHeight
This is now the same as PageHeight.
- EffectivePageWidth
This is now the same as PageWidth.
- FooterDistance
Gets or sets the distance between the footer and the page bottom of the pages in the section.
- HeaderDistance
Gets or sets the distance between the header and the page top of the pages in the section.
- HorizontalPageBreak
Gets or sets a value which defines whether a page should break horizontally. Currently only tables are supported.
- LeftMargin
Gets or sets the left margin of the pages in the section.
- MirrorMargins
Gets or sets a value which defines whether the odd and even pages of the section should change left and right margin.
- OddAndEvenPagesHeaderFooter
Gets or sets a value which defines whether the odd and even pages of the section have different header and footer.
- Orientation
Gets or sets the page orientation of the section. If Orientation is set, the PageFormat will be rotated if necessary. If PageWidth and PageHeight are set, the actual orientation will be defined by width and height. This applies also if only one of those values is set and the other one is calculated according to PageFormat and Orientation values. A quadratic page is considered to be Portrait.
- PageFormat
Gets or sets the page format of the section.
- PageHeight
Gets or sets the page height.
- PageWidth
Gets or sets the page width.
- RightMargin
Gets or sets the right margin of the pages in the section.
- SectionStart
Gets or sets a value which defines whether the section starts on next, odd, or even page.
- StartingNumber
Gets or sets the starting number for the first section page.
- TopMargin
Gets or sets the top margin of the pages in the section.
- Values
Gets the underlying internal nullable values for the properties of this document object.
Methods
- Clone()
Creates a deep copy of this object.
- GetPageSize(PageFormat, out Unit, out Unit)
Gets the page’s size and height for the given PageFormat.
- PreviousPageSetup()
Gets the PageSetup of the previous section, or null if the page setup belongs to the first section.
- ResetPageSize()
Resets PageWidth, PageHeight, PageFormat, and Orientation. Useful for example before defining a new page size for a cloned PageSetup. This ensures that no other previously set page size values will interfere with the newly set values.