JSON API - addPageBorders

addPageBorders

PREMIUM TRIAL / ADVANCED

Adds custom page borders to the Word document.

Note

You are reading the JSON API documentation. For the PHP API method please go to addPageBorders.

JSON data
Key Description
display
  • 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 Hexadecimal color ("000000" (default), "FF0000" ...).
borderSpace Border spacing in points (default is 24).
borderStyle It can be none, single (default), double ... See, for example, https://www.datypic.com/sc/ooxml/t-w_ST_Border.html for a complete list of border available styles.
borderWidth Page border width in eigths of a point (default value is 4).
border<Side>Color Hexadecimal color ("000000" (default), "FF0000" ...). <side> stands for Top, Right, Left or Bottom.
border<Side>Spacing Border spacing in points (default is 24). <side> stands for Top, Right, Left or Bottom.
border<Side>Style It can be none, single (default), double ... See, for example, https://www.datypic.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 Page border width in eigths of a point (default value is 4). <side> stands for Top, Right, Left or Bottom.
offsetFrom Possible values are: "page" or "text".
zOrder Sets the z-index of the border.
Code samples

Example #1

Release notes
  • phpdocx 18.0:
    • new action.