addTextBox

addTextBox

TRIAL / 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.
dashStyle string 'longDashDot', '1 1', '3 1'...
fillColor string Hexadecimal value (#ff0000, #0000ff).
height mixed Height in points or 'auto'.
lineStyle string single, thinThin, thinThick, thickThin, thickBetweenThin
paddingBottom float Distance in cm.
paddingLeft float Distance in mm.
paddingRight float Distance in mm.
paddingTop float Distance in mm.
textWrap string tight, square, through, none.
width int Width in points.
Code samples

Example #1

The resulting Word document looks like: