JavaScript > JavaScript for Acrobat API Reference > JavaScript API > Annotation > Annotation methods > destroy

destroy
 
D
C
Destroys the annotation, removing it from the page. The object becomes invalid.
Example
Remove all "FreeText" annotations on page 0.
	var annots = this.getAnnots({ nPage:0 }); 
	for (var i = 0; i < annots.length; i++) 
		if (annots[i].type == "FreeText") annots[i].destroy();