DynaPDF Manual - Page 425

Previous Page 424   Index   Next Page 426

Function Reference
Page 425 of 860
Return values:
If the function succeeds the return value is the field index, a value greater or equal zero. If the
function fails the return value is a negative error code.
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: GetFieldHighlightMode, GetFieldIndex

Next topic: GetFieldOrientation, GetFieldTextAlign