Xojo Conferences

DynaPDF Manual - Page 332

Previous Page 331   Index   Next Page 333

Function Reference
Page 332 of 770
The function returns the most important properties of an annotation. The parameter Handle must be
a valid annotation handle. All string values are pointers to the original string buffer. You must not
modify or free such a string. Reserved fields must be initialized with NULL.
The function returns also deleted annotations because DeleteAnnotation() does not physically delete
The members QuadPoints and Vertices contain the raw floating point values which are stored in the
annotation. The corresponding values QuadPointCount and VerticesCount contain the number of
floating point values and not the number of vertices or quad points which are stored in the arrays.
Note that the number of values can be odd if an imported annotation contains errors.
Optional Content
Annotations 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);
Migration states
The migration state of a base annotation is stored in text annotations. The base annotation can be an
arbitrary markup annotation, incl. text annotations. A text annotation represents a migration state if
Parent > -1, if Group is false, and if State and StateModel are non-null.
The migration states of a base annotation are usually stored as single linked list. That means the last
state is a just reply of the previous state and so on. The base annotation is the one that has no parent
and this annotation must be a markup annotation.
Return values:
If the function succeeds the return value is 1 and the parameter Annot is filled with values. If the
function fails the return value is 0 and the parameter Annot is left unchanged.

Previous topic: GetAnnotCount, GetAnnotEx

Next topic: GetAnnotFlags