DynaPDF Manual - Page 364

Previous Page 363   Index   Next Page 365

Function Reference
Page 364 of 787
The special flag emNoFuncNames names can be used to avoid the output of the function name in
error messages. Error messages start normally always with the function name in which the error
occurred. While this information is useful during development, it is often not useful in an end user
The meaning of the error mode flags is described in detail at Customized Exception handling.
GetField (obsolete)
LBOOL pdfGetField(
const PPDF* IPDF,
// Instance pointer
UI32 AHandle,
// Field handle
struct TPDFField* Field) // see below
struct TPDFField
SI32 FieldType;
// Field type (see TFieldType)
LBOOL Deleted;
// If true, the field was deleted
struct TPDFRect BBox; // Bounding box
SI32 Handle;
// Field handle
char* FieldName;
// Field name
UI32 FieldNameLen;
// Field name length in characters
UI32 BackCS;
// Color space of background / border color
UI32 TextCS;
// Color space of text color
UI32 BackColor;
// Background color
UI32 BorderColor;
// Border color
UI32 TextColor;
// Text color
LBOOL Checked;
// Only set if the field is a check box
SI32 Parent;
// Parent field handle if any
UI32 KidCount;
// Greater zero if the field has childs
char* Font;
// Used font by the field (PostScript name)
double FontSize;
// Font size
void* Value;
// Field value (char* or UI16*)
// If True, Value is a Unicode string
UI32 ValLen;
// String length in characters
void* ToolTip;
// Tool tip if any
LBOOL UniToolTip;
// If True, ToolTip is a Unicode string
UI32 ToolTipLen;
// String length in characters
The function retrieves the most important properties of a field. This function is marked as obsolete,
please use GetFieldEx() instead. The parameter AHandle must be a valid field handle. The parameter
Handle must be a valid field handle. Field handles are simple array indexes into the field array of the
global AcroForm object. To enumerate all fields of a document execute the function in a loop from 0
though GetFieldCount() -1.
Field colors are returned in the native color space of the field.
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 member FieldNameLen as
follows (C/C++):
TPDFField f;
if (!pdfGetField(pdf, aField, &f)) return 1;
if (f.FieldName && strlen(f.FieldName) != f.FieldNameLen)

Previous topic: GetErrLogMessageCount, GetErrorMessage, GetErrorMode

Next topic: GetFieldBackColor, GetFieldBorderColor

Start Chat