Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.SetTextFieldValue

The function sets or changes the value and default value of a text field.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.SetTextFieldValue"; PDF; Field { ; Value; DefValue; Align } )   More

Parameters

Parameter Description Example Flags
PDF The PDF reference returned from DynaPDF.New. $pdf
Field The field index or field name. "FirstName"
Value The new text field value. "Andreas" Optional
DefValue The new default text field value. "" Optional
Align The text alignment. Can be Left, Center, Right or Justify. "Justify" Optional

Result

Returns OK or error.

Description

The function sets or changes the value and default value of a text field.
The parameters Value and DefValue can both be empty, if both values should be deleted. The parameter DefValue defines the default value of the field, this value is shown in Adobe's Acrobat as long as the field has no value; it will be hidden when entering the field.
The strings are drawn with the font that is associated with the field. The font size is taken from the field settings. If set to "auto", the font size is computed from the field's bounding box.

See also SetTextFieldValue function in DynaPDF manual.

Examples

Sets text field value:

MBS( "DynaPDF.SetTextFieldValue"; $PDF; "FirstName"; "Geoff"; ""; "Left" )

See also

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 27th January 2023


DynaPDF.SetTextDrawMode - DynaPDF.SetTextFieldValueEx