DynaPDF Manual - Page 723

Previous Page 722   Index   Next Page 724

Function Reference
Page 723 of 839
pdfSetFieldIndex(pdf, field, index++);
pdfDeletePDF(pdf); // Do not forget to delete the PDF instance
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
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
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.
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

Previous topic: SetFieldFontSize, SetFieldHighlightMode, SetFieldIndex

Next topic: SetFieldOrientation, SetFieldTextAlign