addBreak

addBreak

TRIAL / ADVANCED / PREMIUM

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

Description
public addBreak ( array $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):

Key Type Description
type string The possible values are: 'line', 'column' and 'page'.
number int The number of breaks to include.
Code samples

Example #1

Example #2

The resulting Word document looks like: