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

DynaPDF Manual - Page 357

Previous Page 356   Index   Next Page 358

Function Reference
Page 357 of 750
Optional Content
Form fields can be part of an Optional Content Group (OCG) or Optional Content Membership
Dictionary (OCMD). If OC is greater -1 an OCG or OCMD handle was set. To determine whether an
OCG handle was set, check whether the value is smaller 0x40000000:
bool IsOCG(SI32 Handle)
{
return (Handle > -1 && Handle < 0x40000000);
}
Return vlues:
If the function succeeds the return value is 1 and the structure Field is filled with values. If the
function fails the return value is 0.
GetFieldEx2
Syntax:
LBOOL pdfGetFieldEx2(
const PPDF* IField,
// Pointer of a field object
struct TPDFFieldEx* Field) // Structure to be filled
The function returns the most important properties of a field like GetFieldEx() but it accepts a field
pointer as input. The parameter IField must be a valid pointer of a field object that was returned by
GetFieldEx(). See also GetFieldEx(). This function can be used to access the parent field or children of
a field (member Kids).
Remarks:
The function assumes that the parameters IField and Field are valid. Passing a null pointer to the
function causes an access violation!
Return values:
If the function succeeds the return value is 1 and the structure Field is filled with values. If the
function fails the return value is 0. The only reason why this function can fail is if the member
StructSize was initialized to an invalid value.
GetFieldExpValCount
Syntax:
SI32 pdfGetFieldExpValCount(
const PPDF* IPDF, // Instance pointer
UI32 AField)
// Field handle
The function returns the number of values/export values which are defined for a field. Supported
field types are combo boxes, list boxes, radio buttons, and check boxes. If the field is a radio button,
the function returns the number of check boxes which are connected with the radio button. This
number can be used to access the check boxes of the radio button either with GetFieldExpValueEx()
or SetFieldExpValue(). If the field is a check box, the return value is always 1 because check boxes do
 

Previous topic: GetFieldEx

Next topic: GetFieldExpValue