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

DynaPDF Manual - Page 367

Previous Page 366   Index   Next Page 368

Function Reference
Page 367 of 750
GetFieldMapName
Syntax:
SI32 pdfGetFieldMapName(
const PPDF* IPDF,
// Instance pointer
UI32 AField,
// Field handle
void* ADDR Value,
// Pointer to mapping name (null-terminated)
LBOOL ADDR Unicode) // If true, Value is an Unicode string
The function retrieves the mapping name of a specific form field if set. The parameter AField must be
a valid field handle. The parameter Value gets a pointer to the original string value, it must not be
NULL. Do not change the or free the value. Depending on whether Unicode is true, Value is pointer to
a null-terminated Unicode string.
The mapping name is used when interactive form field data is exported from the document.
Return values:
If the function succeeds the return value is the string length in characters and the parameters Value
and Unicode are filled with values. If the function fails the return value is a negative error code.
GetFieldName
Syntax:
SI32 pdfGetFieldName(
const PPDF* IPDF, // Instance pointer
UI32 AField,
// Field handle
char* ADDR Name)
// Pointer to field name (null-terminated)
The function retrieves the name of a specific interactive form field. The parameter AField must be a
valid field handle. Note that the check boxes of a radio button field do not have a name.
The parameter Name gets a pointer to the original field name, it must not be NULL. The field name
must not be changed or freed by the application.
Since Acrobat 6 field names can be defined as Ansi or Unicode strings. To determine whether the
string is in Ansi or Unicode format compare the string length with the return value as follows
(C/C++):
char* fieldName = NULL;
SI32 fieldNameLen = pdfGetFieldName(pdf, field, fieldName);
if (fieldNameLen > 0 strlen(fieldName) != fieldNameLen)
{
// We have an Unicode name!
UI16* nameW = (UI16*)fieldName;
}
 

Previous topic: GetFieldIndex

Next topic: GetFieldOrientation