JSON API - addSection

addSection

PREMIUM TRIAL / ADVANCED

Inserts a new section into a Word document.

Note

You are reading the JSON API documentation. For the PHP API method please go to addSection.

JSON data
Key Description
sectionType
  • "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
  • "oddPage": the new section starts in the next available odd page
paperType
  • "A4"
  • "A3"
  • "letter"
  • "legal"
  • "A4-landscape"
  • "A3-landscape"
  • "letter-landscape"
  • "legal-landscape"
  • "custom"
height Section height in twips.
width Section width in twips (twentieths of a point).
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.
numberCols Number of columns for this section.
orient Section page orientation (portrait or landscape).
gutter Gutter in twips (used for binding).
vAlign Vertical alignment (top, center, both, bottom)
bidi Set to true for right to left languages. Default as false.
rtl Set to true for right to left languages. Default as false.
excludeHeadersAndFooters If true, exclude headers and footers reference tags. Default as false.
pageNumberType
  • fmt => number format (cardinalText, decimal, decimalEnclosedCircle, decimalEnclosedFullstop, decimalEnclosedParen, decimalZero, lowerLetter, lowerRoman, none, ordinalText, upperLetter, upperRoman)
  • start => page number
columns
  • width
  • space
endnotes
  • numFmt => numbering format: decimal, upperRoman, lowerRoman, upperLetter...
  • numRestart => continuous, eachSect, eachPage
  • numStart => starting value
  • pos => sectEnd, docEnd
footnotes
  • numFmt => numbering format: decimal, upperRoman, lowerRoman, upperLetter...
  • numRestart => continuous, eachSect, eachPage
  • numStart => starting value
  • pos => sectEnd, docEnd
Code samples

Example #1

Release notes
  • phpdocx 18.0:
    • new action.