DynaPDF Manual - Page 361

Previous Page 360   Index   Next Page 362

Function Reference
Page 361 of 839
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(pdf);
for (i = 0; i < actCount; i++)
{
if (pdfGetActionType(pdf, i) == (SI32)atJavaScript)
pdfDeleteAction(pdf, 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.
GetActionType
Syntax:
SI32 pdfGetActionType(
const PPDF* IPDF, // Instance pointer
UI32 ActHandle)
// Action handle
typedef enum
{
atGoTo,
// Go-to action
atGoToR,
// Go-to remote action
atHide,
// Hide action
atImportData,
// Import data action
atJavaScript,
// JavaScript action
atLaunch,
// Launch action
atMovie,
// Movie action
 

Previous topic: FreeUniBuf, Get3DAnnotStream

Next topic: GetActionTypeEx