Xojo Conferences
XDCMay2019MiamiUSA
MBSOct2019CologneDE

DynaPDF Manual - Page 288

Previous Page 287   Index   Next Page 289

Function Reference
Page 288 of 766
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);
while (actCount > 0)
{
pdfDeleteActionFromObjEx(pdf, otBookmark, objHandle, 0);
--actCount;
}
// Now, we want to delete all actions except JavaScript actions from the
// object.
SI32 i, actCount, actType;
actCount = pdfGetObjActionCount(pdf, otPage, 2); // Page 2
for (i = 0; i < actCount; i++)
{
// Check whether an error occurred
if ((actType = pdfGetActionTypeEx(pdf, otPage, 2, i)) < 0) break;
if (actType != (SI32)atJavaScript)
{
pdfDeleteActionFromObjEx(pdf, otPage, objHandle, i);
break;
}
}
 

Previous topic: DeleteActionFromObjEx

Next topic: DeleteAnnotationFromPage