Skip to main content

Delete

Removes annotation from document.

Inherited from ApiBaseAnnotation.Delete.

Example

Remove the square annotation from document.

// How to delete for an annotation in a PDF document?

// Delete and display the result in a PDF document.

let doc = Api.GetDocument();
let squareAnnot = Api.CreateSquareAnnot([10, 10, 160, 32]);
let page = doc.GetPage(0);
page.AddObject(squareAnnot);
squareAnnot.SetBorderStyle("dashed");
squareAnnot.SetDashPattern([8, 4, 4, 4]);
squareAnnot.Delete();