addPageBorders

addPageBorders

TRIAL / ADVANCED / PREMIUM

Adds custom page borders to the current Word document.

Description
public addPageBorders ( array $options )

This method allows you to insert page borders into the Word document.

Parameters

options

This is an array including all the available styling options.

Key Type Description
display string
  • allPages (display page border on all pages: default value).
  • firstPage (display page border on first page).
  • notFirstPage (display page border on all pages except first).
borderColor string Hexadecimal color ('000000' (default), 'FF0000' ...).
borderSpace int Border spacing in points (default is 24).
borderStyle string It can be none, single (default), double ... See, for example, http://www.schemacentral.com/sc/ooxml/t-w_ST_Border.html for a complete list of border available styles.
borderWidth int Page border width in eigths of a point (default value is 4).
border<Side>Color string Hexadecimal color ('000000' (default), 'FF0000' ...). <side> stands for top, right, left or bottom.
border<Side>Spacing int Border spacing in points (default is 24). <side> stands for top, right, left or bottom.
border<Side>Style string It can be none, single (default), double ... See, for example, http://www.schemacentral.com/sc/ooxml/t-w_ST_Border.html for a complete list of border available styles <side> stands for top, right, left or bottom.
border<Side>Width string Page border width in eigths of a point (default value is 4). <side> stands for top, right, left or bottom.
offsetFrom string Possible values are: 'page' or 'text'.
zOrder int Sets the z-index of the border.
Code samples

Example #1

The resulting Word document looks like: