DynaPDF Manual - Page 401

Previous Page 400   Index   Next Page 402

Function Reference
Page 401 of 839
The value of a text field that uses a number format should contain a pure number without any
formatting characters, e.g. "256.87". The decimal separator, if necessary, should be a period (.) and
no comma.
Because all variants of number and date formats are applied via Javascript actions, there is no easy
way to determine what kind of values a text field accepts.
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.
 

Previous topic: Radio Buttons, Formatted Text Field Value

Next topic: GetFieldExpValCount, GetFieldExpValue