[Table of Contents] [docx version]
WordprocessingML Reference Material - Table of Contents
This element specifies the page margins for all pages in this section.
[Example: Consider a page with a one-inch margin on all sides. Specifying these margins requires the following WordprocessingML:
<w:sectPr>
<w:pgMar w:bottom="1440" w:top="1440" w:right="1440" w:left="1440"/>
…
</w:sectPr>
This section specifies page margins of 1,440 twentieths of a point (one inch) on all sides. end example]
Parent Elements |
Attributes |
Description |
bottom (Page Bottom Spacing) |
Specifies the distance (in twentieths of a point) between the bottom of the text margins for the main document and the bottom of the page for all pages in this section.
If the value of bottom is non-negative, then the text will be placed at the greater of: • The value of bottom • The extent of the footer text
[Example: Consider a document where the footer shall start one inch of the bottom of the page extent, but the contents of the main document story specify that they shall start one-half of an inchh from the page extents. To specify these boundaries, the following page margins may specified in the WordprocessingML:
<w:pgMar ... w:bottom="720"
This fragment specifies that the footer shall start 1440 twentieths of a point from the bottom of the page, but the main document story shall start 720 twentieths of a point from the bottom of the page. Since the footer extent is guaranteed to be greater in this case, the bottom text extent ends at the top of the footer region. end example]
A negative value indicates that the contents of the main document shall be measured from the bottom of the page extent regardless of the footer for that document, and therefore shall overlap the footer text.
[Example: Consider a document where the footer shall start one inch of the bottom of the page extent, but the contents of the main document story shall start one-half of an inch from the page extents. To specify these boundaries, the following page margins may specified in the WordprocessingML:
<w:pgMar ... w:bottom="-720"
This fragment specifies that the footer shall start 1440 twentieths of a point from the bottom of the page, and the main document story shall start 720 twentieths of a point from the bottom of the page. Since the value of bottom is negative in this case, the bottom text extent starts one-half of an inch from the bottom of the page and overlaps any footer text. end example]
The possible values for this attribute are defined by the ST_SignedTwipsMeasure simple type (§2.18.88). |
footer (Spacing to Bottom of Footer) |
Specifies the distance (in twentieths of a point) from the bottom edge of the page to the bottom edge of the footer.
[Example: Consider a document where the footer shall start one inch above the bottom of the page extent.
To specify this boundary, the following page margins must specified in the WordprocessingML:
<w:pgMar … w:footer="1440"/>
This fragment specifies that the footer shall start 1440 twentieths of a point from the bottom of the page. end example]
The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§2.18.105). |
gutter (Page Gutter Spacing) |
Specifies the page gutter for each page in the current section.
The page gutter defines the amount of extra space added to the specified margin, above any existing margin values. [Note: This setting is typically used when a document is being created for binding, in order to ensure that the resulting margins are present after the binding gutter is consumed by the printed matter binding. end note]
[Example: Consider a document where the margin shall start one inch of the left edge of the page extent after one-half of an inch is hidden by the page binding.
To specify this condition, a user could simply use a left margin of 1.5 inches, which would be lost if the margins are later changed, or could specify a one-half inch gutters follows in the WordprocessingML:
<w:pgMar … w:gutter="720"/>
This fragment specifies that the gutter shall span 720 twentieths of a point, after which any margin value shall be added. end example]
The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§2.18.105). |
header (Spacing to Top of Header) |
Specifies the distance (in twentieths of a point) from the top edge of the page to the top edge of the header.
[Example: Consider a document where the header shall start two inches below the top of the page extent. To specify this boundary, the following page margins must specified in the WordprocessingML:
<w:pgMar … w:header="2880"/>
This fragment specifies that the header shall start 2880 twentieths of a point from the top of the page. end example]
The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§2.18.105). |
left (Left Margin Spacing) |
Specifies the distance (in twentieths of a point) between the left edge of the page and the left edge of the text extents for this document.
[Example: Consider a document where the left text extent shall start two inches inside the page extent. To specify this boundary, the following page margins must specified in the WordprocessingML:
<w:pgMar … w:left="2880"/>
This fragment specifies that the left margin shall span 2880 twentieths of a point from the left edge of the page. end example]
The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§2.18.105). |
right (Right Margin Spacing) |
Specifies the distance (in twentieths of a point) between the right edge of the page and the right edge of the text extents for this document.
[Example: Consider a document where the right text extent shall start one inch inside the page.
To specify this boundary, the following page margins must specified in the WordprocessingML:
<w:pgMar … w:right="1440"/>
This fragment specifies that the right margin shall span 1440 twentieths of a point from the right edge of the page. end example]
The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§2.18.105). |
top (Top Margin Spacing) |
Specifies the distance (in twentieths of a point) between the top of the text margins for the main document and the top of the page for all pages in this section.
If the value of top is non-negative, then the text will be placed at the greater of: • The value of top • The extent of the header text
[Example: Consider a document where the header shall start one inch from the top of the page extent, but the contents of the main document story specify that they shall start one-half of an inch from the page extents. To specify these boundaries, the following page margins may specified in the WordprocessingML:
<w:pgMar … w:top="720" w:header="1440"/>
This fragment specifies that the header shall start 1440 twentieths of a point from the top of the page, but the main document story shall start 720 twentieths of a point from the top of the page. Since the header extent is guaranteed to be greater in this case, the main text extent ends at the bottom of the header region. end example]
A negative value indicates that the contents of the main document shall be measured from the top of the page extent regardless of the header for that document, and therefore shall overlap the header text.
[Example: Consider a document where the header shall start one inch from the top of the page extent, but the contents of the main document story shall start one-half of an inch from the page extents. To specify these boundaries, the following page margins may specified in the WordprocessingML:
<w:pgMar ... w:top="-720"
This fragment specifies that the header shall start 1440 twentieths of a point from the top of the page, and the main document story shall start 720 twentieths of a point from the top of the page. Since the value of top is negative in this case, the top text extent starts one-half of an inch from the top of the page and overlaps any header text. end example]
The possible values for this attribute are defined by the ST_SignedTwipsMeasure simple type (§2.18.88). |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_PageMar">
<attribute name="top" type="ST_SignedTwipsMeasure" use="required"/>
<attribute name="right" type="ST_TwipsMeasure" use="required"/>
<attribute name="bottom" type="ST_SignedTwipsMeasure" use="required"/>
<attribute name="left" type="ST_TwipsMeasure" use="required"/>
<attribute name="header" type="ST_TwipsMeasure" use="required"/>
<attribute name="footer" type="ST_TwipsMeasure" use="required"/>
<attribute name="gutter" type="ST_TwipsMeasure" use="required"/>
</complexType>