翻譯|使用教程|編輯:李顯亮|2021-04-19 11:13:40.123|閱讀 232 次
概述:幻燈片注釋用于添加其他信息,作為演示文稿中的參考。演示者添加了這些注釋,以回顧與他們的演示相關的要點。在本文中,將學習如何以編程方式操作演示文稿中的幻燈片注釋。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
幻燈片注釋用于添加其他信息,作為演示文稿中的參考。演示者添加了這些注釋,以回顧與他們的演示相關的要點。在本文中,將學習如何以編程方式操作演示文稿中的幻燈片注釋。特別是,本文將介紹如何使用Java讀取,添加和刪除PowerPoint演示文稿中的幻燈片注釋。
為了處理幻燈片注釋,我們將使用Aspose.Slides。它是功能豐富的API,可讓您從Java應用程序內部創建,編輯和轉換PowerPoint演示文稿。
>>你可以點擊這里下載Aspose.Slides for java最新版測試體驗。
以下是使用Java在PowerPoint演示文稿中閱讀幻燈片注釋的步驟。
下面的代碼示例演示如何使用Java在PowerPoint演示文稿中閱讀幻燈片注釋。
// Load presentation file Presentation presentation = new Presentation("presentation.pptx"); // Access notes slide manager INotesSlideManager mgr = presentation.getSlides().get_Item(0).getNotesSlideManager(); // Read slide notes INotesSlide note = mgr.getNotesSlide(); System.out.println(note.getNotesTextFrame().getText());
以下是使用Java將幻燈片注釋添加到PowerPoint演示文稿中的步驟。
下面的代碼示例演示如何使用Java在PowerPoint演示文稿中添加幻燈片注釋。
// Load presentation file Presentation presentation = new Presentation("presentation.pptx"); // Access notes slide manager INotesSlideManager mgr = presentation.getSlides().get_Item(0).getNotesSlideManager(); // Add text to the notes INotesSlide note = mgr.getNotesSlide(); note.getNotesTextFrame().setText("new slide note"); // Save updated presentation presentation.save("added-slide-notes.pptx", SaveFormat.Pptx);
以下是使用Java刪除PowerPoint演示文稿中的幻燈片注釋的步驟。
下面的代碼示例演示如何使用Java刪除PowerPoint演示文稿中的幻燈片筆記。
// Access notes slide manager Presentation pres = new Presentation("presWithNotes.pptx"); // Remove notes of first slide INotesSlideManager mgr = pres.getSlides().get_Item(0).getNotesSlideManager(); mgr.removeNotesSlide(); // Save updated presentation pres.save("test.pptx", SaveFormat.Pptx);
如果你想試用Aspose的全部完整功能,可聯系在線客服獲取30天臨時授權體驗。
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn