VegaRise.NET
HomeAPI Reference
Back to DOM

PageSetupClass

Definition

Namespace
DOM.Elements
Assembly
DOM.dll

Encapsulates page-level layout and numbering settings for a document section or document.

Remarks

groups common page configuration values such as size, orientation, gutters for binding, page borders, page numbering rules and page margins. Nullable properties indicate "not specified" so consumers can apply document defaults or inherit values from a section/theme. PageSetup Page setup is exposed at the document level on and per section on . Per-section values override document defaults. VDocs.PageSettings PageSettings

Examples

csharp
1// 1. Letter portrait with 1-inch margins
2doc.PageSettings = new PageSetup
3{
4 PageSize = new PageSize(PaperSize.Letter),
5 Orientation = PageOrientation.Portrait,
6 Margin = new Margin(1.0, 1.0, 1.0, 1.0, Units.inch)
7};
8
csharp
1// 2. Landscape A4 with 0.75-inch margins and gutter
2doc.PageSettings = new PageSetup
3{
4 PageSize = new PageSize(PaperSize.A4),
5 Orientation = PageOrientation.Landscape,
6 Margin = new Margin(0.75, 0.75, 0.75, 0.75, Units.inch),
7 Gutter = new DocumentUnit(0.5, Units.inch)
8};
9
csharp
1// 3. Custom size with header/footer heights
2doc.PageSettings = new PageSetup
3{
4 PageSize = new PageSize(11.0, 8.5, Units.inch),
5 Orientation = PageOrientation.Landscape,
6 HeaderHeight = 0.5,
7 FooterHeight = 0.5
8};
9
csharp
1// 4. Configure per-section overrides
2var section = doc.AddSection();
3section.PageSettings = new PageSetup
4{
5 PageSize = new PageSize(PaperSize.A4),
6 Orientation = PageOrientation.Portrait,
7 Margin = new Margin(1.25, 1.25, 1.0, 1.0, Units.inch),
8 PageBorders = new PageBorders { DisplayValues = PageBorderDisplayValues.firstPage }
9};
10

Properties

FooterHeightDocumentUnit

Gets or sets the height reserved for the footer area.

Gets or sets the gutter (binding) space for the page.

HeaderHeightDocumentUnit

Gets or sets the height reserved for the header area.

Margin

Gets or sets the page margins (top, left, right, bottom).

OrientationPageOrientation

Gets or sets the page orientation.

PageBorders

Gets or sets the page border configuration.

PageSize

Gets or sets the physical page size (width and height) and related size attributes.