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

DynaPDF Manual - Page 318

Previous Page 317   Index   Next Page 319

Function Reference
Page 318 of 750
functions before a new buffer is allocated. However, the buffer can be freed manually to reduce
memory usage.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0. This function
can normally not fail; a return value of 0 indicates that an unknown fatal error occurred.
GetActionCount
Syntax:
SI32 pdfGetActionCount(
const PPDF* IPDF) // Instance pointer
The function returns the number of actions contained in a document. This value can be used to
enumerate actions or to delete specific action types.
Example:
SI32 actCount = pdfGetActionCount();
for (i = 0; i < actCount; i++)
{
if (pdfGetActionType(i) == (SI32)atJavaScript)
pdfDeleteAction(i);
}
GetActionHandle
Syntax:
SI32 pdfGetActionHandle(
const PPDF* IPDF, // Instance pointer
TObjType ObjType, // Object type which contains uses the action
UI32 ObjHandle,
// Object handle
UI32 ActIndex)
// Array index -> GetObjActionCount()
The function returns the handle of an action. To determine the number of available actions of a
specific object call GetObjActionCount(). Since the Catalog object contains no handle, the parameter
ObjHandle will be ignored for this object type.
Return values:
If the function succeeds the return value is the action handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
 

Previous topic: FreeUniBuf

Next topic: GetActionType