w:sectPr (Section Properties)
Defines layout properties for a section: page size, margins, columns, headers, and footers.
Description
w:sectPr contains all section-level layout properties for one section of the document. It is defined in ECMA-376 Part 1 §17.6.17.
A document has one section per w:sectPr. The final section’s w:sectPr is a direct child of w:body; other section breaks are stored inside the w:pPr of the last paragraph in the preceding section. Section properties control page size, margins, columns, headers/footers, page numbering, and grid.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:rsidR |
ST_LongHexNumber |
8-digit hex | Revision identifier for this element (informational). |
w:rsidSect |
ST_LongHexNumber |
8-digit hex | Revision identifier for section formatting change. |
Examples
<w:sectPr>
<w:pgSz w:w="12240" w:h="15840"/>
<w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440"
w:header="708" w:footer="708" w:gutter="0"/>
</w:sectPr>
new SectionProperties(
new PageSize { Width = 12240, Height = 15840 },
new PageMargin { Top = 1440, Right = 1440, Bottom = 1440, Left = 1440,
Header = 708, Footer = 708, Gutter = 0 });