Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 11.0   11.1   11.2   11.3   11.4   11.5   12.0   12.1   12.2   12.3    Statistic    FMM    Blog  


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

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


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


Returns OK or error.


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.


Sets text field value:

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

See also

Example Databases

Blog Entries

Created 18th August 2014, last changed 18th August 2014

DynaPDF.SetTextDrawMode - DynaPDF.SetTextFieldValueEx

Feedback: Report problem or ask question.

Start Chat