XML API - pdx:modifyPageLayout

pdx:modifyPageLayout

Modifies the Word document layout

Note

You are reading the XML API documentation. For the PHP API method please go to modifyPageLayout.

Description

Element definition

This element modifies the main layout properties of the Word document like paper type size and margins.

Attributes and sub-elements

paperType

The type of paper to be used. The possible values are:

  • A4
  • A3
  • letter
  • legal
  • A4-landscape
  • A3-landscape
  • letter-landscape
  • legal-landscape
  • custom

options

Key Description
width Document width in twips (twentieths of a point).
height Document height in twips (twentieths of a point).
numberCols Number of columns.
orient Page orientation (portrait or landscape).
marginTop Top margin in twips (twentieths of a point).
marginRight Right margin in twips (twentieths of a point).
marginBottom Bottom margin in twips (twentieths of a point).
marginLeft Left margin in twips (twentieths of a point).
marginHeader Header margins in twips (twentieths of a point).
marginFooter Footer margins in twips (twentieths of a point).
gutter Gutter in twips (twentieths of a point). The gutter is only used for binding.
bidi Set to 'on' for right to left languages (default value is 'off').
rtlGutter Set to 'on' for right to left languages (default value is 'off').
onlyLastSection If true it only modifies the last section (default value is false).
sectionNumbers An array with the sections that you want to modify.
Code samples

Example #1

config.xml

content.xml

settings.xml

PHP code

The resulting Word document looks like: