XmlApi - pdx:addPageBorders


Adds custom page borders to the current Word document.


Element definition

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

Attributes and sub-elements
Key Description
  • allPages (displays page border on all pages: default value).
  • firstPage (displays page border on first page).
  • notFirstPage (displays page border on all pages but the first one).
color Border hexadecimal color ('000000' (default), 'FF0000'...).
offsetFrom Possible values are: 'page' or 'text'.
space Border spacing in points (default is 24).
style Border. 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.
width Page border width in eigths of a point (default value is 4).
zOrder Sets the z-index of the border.
Code samples

Example #1




PHP code

The resulting Word document looks like: