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

DynaPDF Manual - Page 426

Previous Page 425   Index   Next Page 427

Function Reference
Page 426 of 750
Return values:
If the function succeeds the return value 1 and the structure Field is filled with values. If the function
fails the return value is 0.
SI32 pdfGetPageFieldCount(
const PPDF* IPDF) // Instance pointer
The function returns the number of fields used by a page. The page must be opened beforehand with
the function EditPage().
Return values:
If the function succeeds the return value is number of fields used by the page. If the function fails the
return value is a negative error code.
LBOOL pdfGetPageFieldEx(
const PPDF* IPDF,
// Instance pointer
UI32 Index,
// Field index
struct TPDFFieldEx* Field) // Structure to be filled
#define PDF_ANNOT_INDEX 0x40000000 // Special flag to indicate that an
// annotation index was passed to the
// function.
The function returns the most important properties of a field.
The internal organization of fields and annotations were changed in DynaPDF 3.0. Prior versions
stored fields and annotations in separate arrays so that the parameter Index refered directly into
the field array. Due to new features in PDF and to preserve the z-order of overlapping fields and
annotations, fields and annotations are now stored in the same array because forms fields are in
fact Widget annotations.
To achieve optimal processing speed the fields of a page should now be enumerated as follows:
SI32 i, count;
TPDFFieldEx f;
pdfEditPage(PDF, 1);
// Initialize the structure size
f.StructSize = sizeof(f);
// GetPageAnnotCount() returns the number of all annotations, incl.
// form fields!
count = pdfGetPageAnnotCount(PDF);

Previous topic: GetPageField (obsolete)

Next topic: GetPageHeight