addPageBorders

addPageBorders

BASIC / ADVANCED / PREMIUM

Adds custom page borders to the current Word document.

Description
public void addPageBorders(OptionsPageBorders options)

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

Parameters

options

Option 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 Integer 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 Integer 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 Integer 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 Integer Sets the z-index of the border.
Code samples

Example #1

The resulting Word document looks like: