GroupDocs.Annotation for Java 让注释 PowerPoint 演示文稿变得轻松:
- 使用 Annotator 实例打开 PowerPoint 文件。
- 创建并配置所需的注释。
- 将注释添加到演示文稿中。
- 保存已注释的 PowerPoint 文件。
GroupDocs.Annotation for Java 让注释 PowerPoint 演示文稿变得轻松:
// 注释 PowerPoint 演示文稿
// 使用 Annotator 实例打开演示文稿
Annotator annotator = new Annotator("input.pptx");
try {
// 创建区域注释
AreaAnnotation area = new AreaAnnotation();
area.setBox(new Rectangle(100, 100, 200, 80));
area.setBackgroundColor(65535);
area.setPageNumber(0);
area.setMessage("Important");
// 添加注释
annotator.add(area);
// 保存已注释的演示文稿
annotator.save("annotated.pptx");
} finally {
annotator.dispose();
}
向 PowerPoint 演示文稿添加所有注释类型,并使用简洁的 API 进行管理。

在 PowerPoint 文件中突出显示、下划线、删除线或替换文本。
在 PowerPoint 幻灯片上绘制形状并添加水印或图像。
获取、删除、导入和导出 PowerPoint 批注。
// 打开已注释的演示文稿
Annotator annotator = new Annotator("annotated.pptx");
try {
// 获取所有批注
List<AnnotationBase> annotations = annotator.get();
// 检查每个批注
for (AnnotationBase annotation : annotations) {
System.out.println(annotation.getMessage());
}
// 保存演示文稿
annotator.save("output.pptx");
} finally {
annotator.dispose();
}