使用 Python 從 PPT 移除註解和註解作者
使用 Aspose.Slides for Python via .NET 移除簡報註解及其相關作者。
透過 Python 從 PPT 移除註解
Aspose.Slides for Python via .NET
可存取 PPT 簡報中儲存的註解和註解作者。使用 Presentation 載入檔案,清空每位作者的 comments 集合,清空 comment_authors,然後以 PPT 格式儲存結果。
使用 Python 從 PPT 移除註解
with slides.Presentation("presentation.ppt") as presentation:
for comment_author in presentation.comment_authors:
comment_author.comments.clear()
presentation.comment_authors.clear()
presentation.save("presentation-without-comments.ppt", slides.export.SaveFormat.PPT)如何透過 Python 從 PPT 移除註解
依照下列步驟,從 PPT 簡報中移除所有註解和註解作者。
- 安裝 Aspose.Slides for Python via .NET。
- 使用
Presentation開啟 PPT 檔案。 - 逐一處理
comment_authors並清空每位作者的comments集合。 - 清空
comment_authors集合。 - 使用
SaveFormat.PPT呼叫save,寫入更新後的 PPT 簡報。
以 Aspose.Slides 建置
線上移除 PPT 註解
免費的 Aspose.Slides Annotation 應用程式以 Aspose.Slides for Python via .NET 建置,與上方程式碼使用的是同一個 API。開啟它,看看 API 能如何處理您自己的 PPT 檔案。
- 在瀏覽器中執行,無需安裝任何軟體。
- 在撰寫程式碼之前,先了解 Aspose.Slides 如何移除註解。
- 移除 PPT 檔案中的所有註解。
- 下載清理後的檔案。
註解支援的其他格式
使用 Python,您也可以從其他格式移除註解。