Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 645

Previous Page 644   Index   Next Page 646

Function Reference
Page 645 of 750
SetFieldMapName
Syntax:
LBOOL pdfSetFieldMapName(
const PPDF* IPDF, // Instance pointer
UI32 AField,
// Field handle
const char* Name) // Mapping name (NULL to delete it)
The function sets or changes the mapping name of a field. The mapping is used when exporting
interactive form field data from the document. The parameter AField must be a field handle. If the
mapping name of the field should be deleted set the parameter Name to NULL. This function is also
available in a Unicode compatible version. However, a mapping name should be defined as an Ansi
string.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetFieldName
Syntax:
LBOOL pdfSetFieldName(
const PPDF* IPDF,
// Instance pointer
UI32 AField,
// Field handle
const char* NewName) // New field name
The function changes the name of an interactive form field. Field names must sometimes be changed
when multiple interactive forms with identical field names are imported. The resulting form will be
damaged if the names of such fields are not changed.
The function does not check whether a field name is already in use. Such a check would not be
useful, because the usage of the function would be much more complicated. Use the function
CheckFieldNames() to check the integrity of the form after field names were changed.
Remarks:
Changing field names can cause problems if the field is used in a JavaScript action or global
JavaScript. The JavaScript(s) must also be changed to avoid error messages in Adobe's Acrobat.
Global JavaScripts can be accessed with the function GetJavaScript() and changed with the function
ChangeJavaScript(). A JavaScript Action can be accessed with the function GetJavaScriptAction() and
changed with the function ChangeJavaScriptAction().
Remarks:
This function is available in an Ansi and Unicode compatible version. Unicode field names are
supported since PDF 1.5 (Acrobat 6).
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: SetFieldIndex

Next topic: SetFieldTextAlign