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

DynaPDF Manual - Page 350

Previous Page 349   Index   Next Page 351

Function Reference
Page 350 of 750
GetField (obsolete)
Syntax:
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*)
LBOOL UniVal;
// 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)
{
// We have an Unicode name!
 

Previous topic: GetErrorMode

Next topic: GetFieldBorderColor