Package com.evopdf

# Class PdfFormTextBox

java.lang.Object
com.evopdf.PdfFormField
com.evopdf.PdfFormTextBox

public class PdfFormTextBox extends PdfFormField
Represents a text box in a PDF form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PdfFormTextBox(RectangleFloat box, String text, PdfFont pdfFont)`
  Constructs a text box form field

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PdfFont`
  `font()`
  Gets the PDF form text box font
  `boolean`
  `isMultiLine()`
  Gets the flag indicating if the text box is multiline
  `boolean`
  `isPassword()`
  Gets the flag indicating if this text box is used to enter a password
  `int`
  `maxLength()`
  Gets the maximum length of the field text in characters
  `void`
  `setFont(PdfFont pdfFont)`
  Sets the PDF form text box font
  `void`
  `setIsMultiLine(boolean isMultiline)`
  Sets the flag indicating if the text box is multiline.
  `void`
  `setIsPassword(boolean isPassword)`
  Sets the flag indicating if this text box is used to enter a password.
  `void`
  `setMaxLength(int maxLength)`
  Sets the maximum length of the field text in characters
  `void`
  `setText(String text)`
  Sets the text box initial text
  `String`
  `text()`
  Gets the text box initial text

  ### Methods inherited from class com.evopdf.PdfFormField

  `boundingRectangle, defaultValue, export, flatten, name, parentForm, readOnly, required, setAction, setBoundingRectangle, setDefaultValue, setExport, setFlatten, setName, setReadOnly, setRequired, setStyle, setToolTip, style, toolTip`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PdfFormTextBox

    public PdfFormTextBox(RectangleFloat box, String text, PdfFont pdfFont)
    Constructs a text box form field
    Parameters:
      `box` - the text box control bounding box
      `text` - the text box initial text
      `pdfFont` - the text font

- ## Method Details

  - ### text

    public String text()
    Gets the text box initial text
    Returns:
      the text box initial text

  - ### setText

    public void setText(String text)
    Sets the text box initial text
    Parameters:
      `text` - the text box initial text to set

  - ### font

    public PdfFont font()
    Gets the PDF form text box font
    Returns:
      the PDF form text box font

  - ### setFont

    public void setFont(PdfFont pdfFont)
    Sets the PDF form text box font
    Parameters:
      `pdfFont` - the PDF form text box font to set

  - ### isMultiLine

    public boolean isMultiLine()
    Gets the flag indicating if the text box is multiline
    Returns:
      the flag value

  - ### setIsMultiLine

    public void setIsMultiLine(boolean isMultiline)
    Sets the flag indicating if the text box is multiline. This property is false by default
    Parameters:
      `isMultiline` - the flag value to set

  - ### isPassword

    public boolean isPassword()
    Gets the flag indicating if this text box is used to enter a password
    Returns:
      the flag value

  - ### setIsPassword

    public void setIsPassword(boolean isPassword)
    Sets the flag indicating if this text box is used to enter a password. This property is false by default
    Parameters:
      `isPassword` - the flag value to set

  - ### maxLength

    public int maxLength()
    Gets the maximum length of the field text in characters
    Returns:
      the maximum length of the field text in characters

  - ### setMaxLength

    public void setMaxLength(int maxLength)
    Sets the maximum length of the field text in characters
    Parameters:
      `maxLength` - the maximum length of the field text in characters to set