Skip to content

SectionProperties

Defined in: src/core/document-model/types.ts:2039

§17.6.17 w:sectPr — a section’s page setup, header/footer refs and columns.

readonly optional columns?: SectionColumns

Defined in: src/core/document-model/types.ts:2078

§17.6.4 w:cols — multi-column section layout.


readonly optional evenAndOddHeaders?: boolean

Defined in: src/core/document-model/types.ts:2076

ECMA-376 §17.15.1.36 — w:evenAndOddHeaders toggle in word/settings.xml (document-wide, not per-section). When true even-numbered pages use the even header/footer references.


readonly footers: readonly HeaderFooterReference[]

Defined in: src/core/document-model/types.ts:2043


readonly optional gridLinePitchPt?: Pt

Defined in: src/core/document-model/types.ts:2113

§17.6.5 w:docGrid — the line grid a lines/linesAndChars section rules its text onto, as the pitch in points. Every line of the section’s text is as tall as a whole number of these, however tall its own font makes it. Absent ⇒ no grid (w:type="default", or none stated).


readonly headers: readonly HeaderFooterReference[]

Defined in: src/core/document-model/types.ts:2042


readonly optional lineNumbering?: object

Defined in: src/core/document-model/types.ts:2061

§17.6.8 w:lnNumType — line numbers printed in the margin beside the text.

readonly countBy: number

Print every countBy-th line (default 1).

readonly optional distancePt?: Pt

How far the number stands off the text (w:distance); absent ⇒ Word’s quarter inch.

readonly restart: "newPage" | "newSection" | "continuous"

§17.18.55 — where the count restarts.

readonly start: number

The number the count starts at (default 1).


readonly optional margins?: PageMargins

Defined in: src/core/document-model/types.ts:2041


readonly optional pageBorders?: object

Defined in: src/core/document-model/types.ts:2084

§17.6.10 w:pgBorders — the rules drawn around the page. offsetFrom says what each edge’s spacePt is measured from: the paper’s edge, or the text margin it stands outside of.

readonly borders: CellBorders

readonly offsetFrom: "text" | "page"


readonly optional pageNumberFormat?: NumberingFormat

Defined in: src/core/document-model/types.ts:2059

§17.6.12 w:pgNumType w:fmt — how a PAGE field prints the section’s page numbers (§17.18.59): lowerRoman numbers a book’s front matter i, ii, iii before its body starts again at 1. Absent ⇒ decimal.


readonly optional pageNumberStart?: number

Defined in: src/core/document-model/types.ts:2053

§17.6.12 w:pgNumType w:start — the number the section’s first page is printed with. Absent ⇒ the count carries on from the section before.


readonly optional pageSize?: PageSize

Defined in: src/core/document-model/types.ts:2040


readonly optional sectionStart?: "continuous" | "nextPage" | "oddPage" | "evenPage"

Defined in: src/core/document-model/types.ts:2095

§17.6.22 w:type — where the section starts. continuous starts it on the page already in hand rather than a fresh one; nextPage on the next sheet; oddPage and evenPage on the next sheet of that PARITY, which means a blank one in between when the count falls wrong. (nextColumn is not distinguished from nextPage.)


readonly optional textDirection?: "btLr" | "tbRl"

Defined in: src/core/document-model/types.ts:2106

§17.6.20 w:textDirection — which way the section’s lines run. tbRl sets each line top to bottom and the next one to the left of it: the text turned a quarter clockwise on the sheet, which is how a viewer shows a page turned by /Rotate 90 whose words stood upright in its box. Word lays a section out that way for btLr as well, so the layout reads both alike. Only the body’s text turns: the headers, the footers and every drawing anchored to the page keep the sheet’s own axes. Absent ⇒ left to right, top to bottom.


readonly optional titlePg?: boolean

Defined in: src/core/document-model/types.ts:2048

ECMA-376 §17.10.6 — w:titlePg toggle in sectPr. When true the first page of the section uses the first header/footer references.