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

DynaPDF Manual - Page 285

Previous Page 284   Index   Next Page 286

Function Reference
Page 285 of 750
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: DeleteActionFromObjEx

Next topic: DeleteEmbeddedFile