PDF 生成模板编辑器
开源可视化 PDF 生成引擎,支持自定义模板,并提供面向开发者的 API,灵活构建文档生成流程。
删除注释的步骤如下:
删除注释的代码如下:
// 获取需要删除注释的页面对象。
CPDFPage page = document.pageAtIndex(0);
// 获取该页面的注释列表。
List<CPDFAnnotation> annotations = page.getAnnotations();
if (annotations != null && annotations.size() > 0) {
// 在注释列表中寻找想要删除的注释并将其移除。
page.deleteAnnotation(annotations.get(0));
}// 获取需要删除注释的页面对象。
val page = document.pageAtIndex(i)
// 获取该页面的注释列表。
val annotations = page.annotations
if (annotations != null && annotations.size > 0) {
// 在注释列表中寻找想要删除的注释并将其移除。
page.deleteAnnotation(annotations[0])
}