Notitie
Contents
[
Hide
]
Toont hoe je notitieslides kunt toevoegen, lezen, verwijderen en bijwerken met Aspose.Slides for Python via .NET.
Notitieslide toevoegen
Maak een notitieslide en ken er tekst aan toe.
def add_note():
with slides.Presentation() as presentation:
slide = presentation.slides[0]
notes_slide = slide.notes_slide_manager.add_notes_slide()
notes_slide.notes_text_frame.text = "My note"
presentation.save("note.pptx", slides.export.SaveFormat.PPTX)
Toegang tot een notitieslide
Lees de tekst van een bestaande notitieslide.
def access_note():
with slides.Presentation("note.pptx") as presentation:
slide = presentation.slides[0]
notes_slide = slide.notes_slide_manager.notes_slide
notes = notes_slide.notes_text_frame.text
Notitieslide verwijderen
Verwijder de notitieslide die bij een slide hoort.
def remove_note():
with slides.Presentation("note.pptx") as presentation:
slide = presentation.slides[0]
# Verwijder de notitieslide.
slide.notes_slide_manager.remove_notes_slide()
presentation.save("note_removed.pptx", slides.export.SaveFormat.PPTX)
Notitiestekst bijwerken
Wijzig de tekst van een notitieslide.
def update_note_text():
with slides.Presentation("note.pptx") as presentation:
slide = presentation.slides[0]
# Werk notitietekst bij.
slide.notes_slide_manager.notes_slide.notes_text_frame.text = "Updated"
presentation.save("note_updated.pptx", slides.export.SaveFormat.PPTX)