addTextBox

addTextBox

BASIC / ADVANCED / PREMIUM

Inserts text boxes into the Word document.

Description
public addTextBox ( mixed $content [, array $options] )

This method allows the insertion of a text box into your Word document.

Parameters

content

It may be a:

  • Word fragment.
  • plain text string.
  • an array with same parameters used in the addText method:
    • the first array entry is the text to be included in the text box.
    • the second one is itself another array with all the standard text formatting options.

options

The possible keys and values are:

Key Type Description
align string center, left, right.
border int Border width.
borderColor string Hexadecimal value (#ff0000, #0000ff).
borderWidth float value in points.
contentVerticalAlign string top (default), center or bottom.
fillColor string Hexadecimal value (#ff0000, #0000ff).
height mixed Height in points or 'auto'.
textWrap string tight, square, through, none.
paddingBottom float Distance in cm.
paddingLeft float Distance in mm.
paddingRight float Distance in mm.
paddingTop float Distance in mm.
width int Width in points.
Code samples

Example #1

The resulting Word document looks like: