addTextBox

addTextBox

BASIC / ADVANCED / PREMIUM

Inserts text boxes into the Word document.

Description
public void addTextBox(String text)
public void addTextBox(OptionsText textParams)
public void addTextBox(String text, OptionsTextBox options)
public void addTextBox(OptionsText textOptions, OptionsTextBox options)
public void addTextBox(WordFragment content)
public void addTextBox(WordFragment content, OptionsTextBox options)

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

Parameters

options

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

Example #1

The resulting Word document looks like: