For the complete documentation index, see llms.txt. This page is also available as Markdown.

Remove annotation from document on iOS

To remove an annotation from a document.

PTPDFDoc *doc = [[PTPDFDoc alloc] initWithFilepath: filename];
PTPage *page = [doc GetPage:1];

// remove by index
[page AnnotRemoveWithIndex:0];

// remove by annotation
PTAnnot *annotation = [page GetAnnot:0];
[page AnnotRemoveWithAnnot:annotation];
let doc: PTPDFDoc = PTPDFDoc(filepath: filename)
let page: PTPage = doc.getPage(1)

// remove by index
page.annotRemove(with: 0)

// remove by annotation
let annotation: PTAnnot = page.getAnnot(0)
page.annotRemove(with: annotation)

Last updated

Was this helpful?