DynaPDF Manual - Page 369

Previous Page 368   Index   Next Page 370

Function Reference
Page 369 of 777
The background and border color can be set to the special value NO_COLOR which means the
background or border is transparent. The color space is set to DeviceRGB in this case.
String values can be either in Unicode or Ansi format but only one format is set at time.
The parent field and the children of a field (member Kids) can be accessed with GetFieldEx2().
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
 

Previous topic: GetFieldCount, GetFieldEx

Next topic: GetFieldExpValue