DynaPDF Manual - Page 295

Previous Page 294   Index   Next Page 296

Function Reference
Page 295 of 777
DeleteAnnotation
Syntax:
SI32 pdfDeleteAnnotation(
const PPDF* IPDF, // Instance pointer
UI32 AHandle)
// Annotation handle
This function deletes an annotation. The parameter Handle must be a valid annotation handle.
Annotations are global objects. To delete specific annotations of a PDF file use the functions
GetAnnotCount(), GetAnnotType() and DeleteAnnotation() (see example below).
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Example (C++):
// This example deletes all web links contained in the document
using namespace DynaPDF;
SI32 aType, annotCount = pdfGetAnnotCount();
for (SI32 i = 0; i < annotCount; i++)
{
if ((aType = pdfGetAnnotType(i)) < 0) break;
if ((TAnnotType)aType == atWebLink)
pdfDeleteAnnotation(i);
}
DeleteAnnotationFromPage
Syntax:
LBOOL pdfDeleteAnnotationFromPage(
const PPDF* IPDF, // Instance pointer
UI32 PageNum,
// Page number from which to delete the annotation
UI32 Handle)
// Annotation handle
The function deletes an annotation from a page. Typical annotations which are shared among pages
are Watermark and Stamp annotations. PageNum is the page number from which the annotation
should be deleted. The first page is denoted by 1.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: DeleteActionFromObj, DeleteActionFromObjEx

Next topic: DeleteAppEvents, DeleteBookmark, DeleteEmbeddedFile