addBreak

addBreak

BASIC / ADVANCED / PREMIUM

Inserts a line, column or page break into the Word document.

Description
public void addBreak()
public void addBreak(OptionsBreak options)

This method allows the insertion of a break into the document.

  • line: inserts a standard line break.
  • column: inserts a column break, i.e. the text restarts to be rendered in the next column if the section has more than one column.
  • page: the contents continue in the next available page.

You may also include a line or column break in the middle of a paragraph via the addText method.

Parameters

options

The possible keys and values are (required options are shown with yellow background):

Option Type Description
type String The possible values are: "line", "column" and "page".
number Integer The number of breaks to add.
Code samples

Example #1

Example #2

The resulting Word document looks like: