PDFium Delphi Component 文件

RemoveAnnotationObject 方法

组件: TPdf  ·  单元: PDFium
从注释删除一个页面对象

Syntax

procedure RemoveAnnotationObject(Index, ObjectIndex: Integer);

IndexInteger。当前页注释的从零开始的索引
ObjectIndexInteger。要删除对象的从零开始的索引,低于 AnnotationObjectCount。越界索引会引发 EPdfError

Description

从墨迹或图章注释中删除一笔或一个形状,而不触及其余部分、注释字典或页面内容

删除后,后续对象会重新编号,因此删除多个的循环应反向遍历索引

在不支持注释对象编辑的 PDFium 构建上,调用会引发异常而非静默失败,因此调用者总能得知编辑未发生

See Also

AnnotationObjectCount, AddPathToAnnotation, DeleteAnnotation, UpdateAnnotationObject