Created
April 16, 2021 16:48
-
-
Save aspose-com-gists/a605ff4bc972944568c9ccd989373404 to your computer and use it in GitHub Desktop.
Work with PowerPoint Slide Notes in Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment