Manuals

 

SetaPDF_TextField::getValue()

Description

class SetaPDF_TextField extends SetaPDF_FormField {
mixed getValue ( [boolean $richText=false[, string $encoding=null]] ) }

Gets the current value of the text field.

Parameters

$richText

If this value is set to true and the form field is defined as a richtext field, the API returns an array with the following keys:

body:
The current content of the body-tag.

bodystyle:
The value of the style-attribute of the body-tag.

value:
The plaintext value.

_xml:
The complete xml data.

$encoding

Defines the encoding of the returned string. If left to "null" the encoding provided in the factory-method is used (default: windows-1252//IGNORE). The conversion is handle through a wrapper class around iconv (SetaPDF/Tools/Encoding.php).

Pass false to get the untouched value in PdfDocEncoding or UTF-16BE.

Return Value

A normal text field will return the current value.

A rich text field will return an array, as described above.