addTextBox

addTextBox

BASIC / ADVANCED / PREMIUM

Inserts text boxes into the Word document.

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

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: