GroupDocs.Annotation for Java 让注释 PPTX 演示文稿变得轻松:
- 使用 Annotator 实例打开 PPTX。
- 创建并配置所需的注释。
- 将注释添加到演示文稿。
- 保存已注释的 PPTX。
GroupDocs.Annotation for Java 让注释 PPTX 演示文稿变得轻松:
// 为 PPTX 演示文稿添加注释
// 使用 Annotator 实例打开 PPTX
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);
// 保存已注释的 PPTX
annotator.save("annotated.pptx");
} finally {
annotator.dispose();
}
向 PowerPoint 演示文稿添加所有注释类型,并使用简洁的 API 进行管理。

在 PPTX 文件中高亮、下划线、删除线或替换文本。
在 PPTX 幻灯片上绘制形状并添加水印或图像。
获取、删除、导入和导出 PPTX 注释。
// 打开已注释的 PPTX
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();
}