THotPDF.RemoveLoadedAnnotation Method
Deletes a single annotation object from a specified page of the loaded PDF document by index
Declaration
procedure RemoveLoadedAnnotation(PageIndex, AnnotationIndex: Integer);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page |
AnnotationIndex | Zero-based index of the annotation to be deleted in the page's annotation array |
Usage notes
- 删除后页面注释数组的索引将重新编排,若需删除多条请从高索引向低索引逆序操作
- Form fields (AcroForm widgets) are technically also annotations; deleting widget annotations may affect form-filling functionality
- Changes will only be written to the file after the document is saved