[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

pgSz (Page Size)

This element specifies the properties (size and orientation) for all pages in the current section.\

[Example: Consider a section that shall be printed on A4 paper. The WordprocessingML for this paper size is as follows:

<w:pgSz w:w="11907" w:h="16839" />

This output states that all pages in this section shall be 11907 twentieths of a point wide (11907 twentieths of a point = 8.269") and 16839 twentieths of a point high (16939 twentieths of a point = 11.694"). end example]

Parent Elements

sectPr2.6.17); sectPr2.6.18); sectPr2.6.19)

 

Attributes

Description

code (Printer Paper Code)

Specifies a printer-specific paper code for the paper type, which shall be used by the printer for pages in this section.

 

This code is stored to ensure the proper paper type is chosen if the specified paper size matches the sizes of multiple paper types supported by the current printer.

 

[Example: Consider the following WordprocessingML fragment:

 

<w:pgSz … w:code="240" />

 

The code attribute specifies a value of 240, which will be sent to the printer and used by the printer to determine the appropriate paper type to use when printing.

 

This value is not interpreted or modified other than storing it as specified by the printer. end example]

 

The possible values for this attribute are defined by the ST_DecimalNumber simple type2.18.16).

h (Page Height)

Specifies the height (in twentieths of a point) for all pages in the current section.

 

[Example: Consider the following WordprocessingML:

 

<w:pgSz w:w="15840" w:h="12240" />

 

All pages in this section are displayed on a page that is 12240 twentieths of a point (8.5") tall. end example]

 

The possible values for this attribute are defined by the ST_TwipsMeasure simple type2.18.105).

orient (Page Orientation)

Specifies the orientation of all pages in this section.

 

This information is used to determine the actual paper size to use on the printer.

 

[Example: Pages 11" wide by 8.5" long in landscape mode use 8.5"x11" paper, because the width and height are reversed for pages in this landscape section with respect to the printed page. end example]

 

This implies that the actual paper size width and height are reversed for pages in this section. If this attribute is omitted, then portrait shall be implied.

 

[Example: Consider the following WordprocessingML:

 

<w:pgSz w:w="15840" w:h="12240" w:orient="landscape" />

 

Although the page width is 11", and page height is 8.5", according to the w and attributes, because the orient attribute is set to landscape, pages in this section are printed on 8.5x11" paper in landscape mode. end example]

 

The possible values for this attribute are defined by the ST_PageOrientation simple type2.18.71).

w (Page Width)

This attribute indicates the width (in twentieths of a point) for all pages in the current section.

 

[Example: Consider the following WordprocessingML:

 

<w:pgSz w:w="15840" w:h="12240" />

 

All pages in this section are displayed on a page that is 15840 twentieths of a point (11") wide. end example]

 

The possible values for this attribute are defined by the ST_TwipsMeasure simple type2.18.105).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_PageSz">

   <attribute name="w" type="ST_TwipsMeasure" use="optional"/>

   <attribute name="h" type="ST_TwipsMeasure" use="optional"/>

   <attribute name="orient" type="ST_PageOrientation" use="optional"/>

   <attribute name="code" type="ST_DecimalNumber"/>

</complexType>