DynaPDF Manual - Page 320
Previous Page 319 Index Next Page 321
Function Reference
Page 320 of 839
DeleteActionFromObj
Syntax:
SI32 pdfDeleteActionFromObj(
const PPDF* IPDF, // Instance pointer
TObjType ObjType, // Object type
UI32 ActHandle,
// Action handle
UI32 ObjHandle)
// Object handle
typedef enum
{
otAction,
otAnnotation,
otBookmark,
otCatalog,
otField,
otPage,
otPageLink
}TObjType;
This function deletes an action from a PDF object. If the object type is page, then use the page
number as handle. If the handle of the action is not known, because the object was may be imported
from an external PDF file, then use the function DeleteActionFromObjEx() instead.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
DeleteActionFromObjEx
Syntax:
SI32 pdfDeleteActionFromObjEx(
const PPDF* IPDF, // Instance pointer
TObjType ObjType, // Object type
UI32 ObjHandle,
// Object handle
UI32 ActIndex)
// Action index (see below)
This function can be used to delete an action from an object without using an action handle. The
action handle is often not known because the object was may be imported from an external PDF file.
In this case the actions of the object can be enumerated in a while statement and deleted by this
function if necessary (see example below).
The maximum index is decremented each time an action was deleted.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Example (C):
// In this example, all actions are removed from the object. The action index can be zero because the
// next action gets the position of the deleted one.
SI32 actCount, objHandle;
actCount = pdfGetObjActionCount(pdf, otBookmark, objHandle);
Previous topic: DeleteAcroForm
Next topic: DeleteAltFontList, DeleteAnnotation