Section:
Overview
Import annotations
Export annotations
Style properties
Add sticky note
Add link annotation
Add stamp annotation
Add highlight annotation
Add free text annotation
Add rectangle annotation
Remove annotation
Flatten annotations
Samples
APIs
To remove an annotation from a document.
1PDFDoc doc = new PDFDoc(filename);2Page page = doc.GetPage(1);34// remove by index5page.AnnotRemove(0);67// remove by annotation8Annot annotation = page.GetAnnot(0);9page.AnnotRemove(annotation);
1PDFDoc doc(filename);2Page page = doc.GetPage(1);34// remove by index5page.AnnotRemove(0);67// remove by annotation8Annot annotation = page.GetAnnot(0);9page.AnnotRemove(annotation);
1doc := NewPDFDoc(filename)2page := doc.GetPage(1)34// remove by index5page.AnnotRemove(0)67// remove by annotation8annotation := page.GetAnnot(0)9page.AnnotRemove(annotation)
1PDFDoc doc = new PDFDoc(filename);2Page page = doc.getPage(1);34// remove by index5page.annotRemove(0);67// remove by annotation8Annot annotation = page.getAnnot(0);9page.annotRemove(annotation);
1async function main() {2 const doc = await PDFNet.PDFDoc.createFromURL(filename);3 const page = await doc.getPage(1);45 // remove by index6 await page.annotRemove(0);78 // remove by annotation9 const annotation = await page.getAnnot(0);10 await page.annotRemove(annotation);11}12PDFNet.runWithCleanup(main);
1PTPDFDoc *doc = [[PTPDFDoc alloc] initWithFilepath: filename];2PTPage *page = [doc GetPage:1];34// remove by index5[page AnnotRemoveWithIndex:0];67// remove by annotation8PTAnnot *annotation = [page GetAnnot:0];9[page AnnotRemoveWithAnnot:annotation];
1$doc = new PDFDoc($filename);2$page = $doc->GetPage(1);34// remove by index5$page->AnnotRemove(0);67// remove by annotation8$annotation = $page->GetAnnot(0);9$page->AnnotRemove($annotation);
1doc = PDFDoc(filename)2page = doc.GetPage(1)34# remove by index5page.AnnotRemove(0)67# remove by annotation8annotation = page.GetAnnot(0)9page.AnnotRemove(annotation)
1doc = PDFDoc.new(filename)2page = doc.GetPage(1)34# remove by index5page.AnnotRemove(0)67# remove by annotation8annotation = page.GetAnnot(0)9page.AnnotRemove(annotation)
1Dim doc As PDFDoc = New PDFDoc(filename)2Dim page As Page = doc.GetPage(1)34' remove by index5page.AnnotRemove(0)67' remove by annotation8Dim annotation As Annot = page.GetAnnot(0)9page.AnnotRemove(annotation)
Did you find this helpful?
Trial setup questions?
Need other help?
Pricing or product questions?