通过 C++ 从 ODP 中删除评论
使用
Aspose.Slides for C++
从 ODP 演示文稿中删除评论和评论作者。以下示例先清除 get_CommentAuthors 中每位作者的评论,再清空评论作者集合。
从 ODP 中删除批注 – C++
auto presentation = MakeObject<Presentation>(u"example.odp");
// Delete all comments from the presentation.
for (auto author : presentation->get_CommentAuthors())
{
author->get_Comments()->Clear();
}
// Delete all authors.
presentation->get_CommentAuthors()->Clear();
presentation->Save(u"output.odp", SaveFormat::Odp);
presentation->Dispose();如何通过 C++ 从 ODP 中删除评论
按照以下步骤从 ODP 演示文稿中删除评论和评论作者。
- 安装 Aspose.Slides for C++。请参阅安装。
- 使用
Presentation类加载 ODP 文件。 - 遍历
get_CommentAuthors中的评论作者。 - 使用
get_Comments()->Clear()清除每位作者的评论。 - 清空评论作者集合。
- 使用
SaveFormat::Odp保存更新后的演示文稿。
基于 Aspose.Slides 构建
在线删除 ODP 评论
免费的 Aspose.Slides Annotation 应用基于 Aspose.Slides for C++ 构建,与上方代码使用的是同一 API。打开它,看看 API 能如何处理您自己的 ODP 文件。
- 在浏览器中运行,无需安装任何软件。
- 在编写代码之前,先了解 Aspose.Slides 如何删除评论。
- 删除 ODP 文件中的所有评论。
- 下载清理后的文件。
批注支持的其他格式
使用 C++,您还可以从其他格式中删除批注。