DynaPDF Manual - Page 744

Previous Page 743   Index   Next Page 745

Function Reference
Page 744 of 787
SetTextFieldValue
Sytnax:
SI32 pdfSetTextFieldValue(
const PPDF* IPDF,
// Instance pointer
UI32 Field,
// Text field handle
const char* Value,
// Field's value or NULL
const char* DefValue, // Field's default value or NULL
TTextAlign Align)
// Text alignment
The function sets or changes the value and default value of a text field. The parameters Value and
DefValue can both be NULL, 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.
Remarks:
This function is implemented in an Ansi and Unicode compatible version. Because interactive form
fields do not support Unicode, the strings must contain characters which are defined in the code
page 1252 or MacRoman.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetTextFieldValueEx
Syntax:
LBOOL pdfSetTextFieldValueEx(
const PPDF* IPDF,
// Instance pointer
UI32 Field,
// Text field handle
const char* Value) // New value or NULL to delete it
The function changes or sets the value of a text field. If the value is set to NULL, the field's value will
be deleted.
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.
Remarks:
This function is implemented in an Ansi and Unicode compatible version. Because interactive form
fields do not support Unicode, the string must contain characters which are defined in the code page
1252 or MacRoman.
 

Previous topic: How to use text as clipping path?

Next topic: SetTextRect, SetTextRise

Start Chat