pdx:addSection

Inserts a new section into the Word document.

Description

Element definition

This element allows the creation of new sections in your Word document.

This option is needed if you wish to change the page properties, for example, from portrait to landscape orientation in part of your Word document.

All content inserted after a call to this element will be incorporated into the new section.

Attributes and sub-elements

type

These parameters determines the kind of break (if any) used. The possible values are:

  • nextPage (default value): the new section starts in a new page,
  • nextColumn: the new section starts in the following column,
  • continuous: there is no break between sections,
  • evenPage: the new section starts in the next available even page and
  • oddPage: the new section starts in the next available odd page.

paperType

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

  • A4,
  • A3,
  • letter,
  • legal,
  • A4-landscape,
  • letter-landscape,
  • legal-landscape and
  • custom.

This element is only required if the paperType element has been set up to custom.

key Description
width Section width in twips (twentieths of a point).
height Section height in twips.
numberCols Number of columns for this section.
orient Section page orientation (portrait or landscape).
marginTop Top margin for this section in twips.
marginRight Right margin for this section in twips.
marginBottom Bottom margin for this section in twips.
marginLeft Left margin for this section in twips.
marginHeader Header margin in twips.
marginFooter Footer margin in twips.
gutter Gutter in twips (used for binding).
Code samples
#Example 1

config.xml

content.xml

settings.xml