Arbeta med Slideshow -- Aspose.Slides FOSS för Python

Aspose.Slides FOSS for Python provides classes for working with working with slideshow.


Overview

De viktigaste klasserna är:

  • ISlideShowTransition
  • Slide

Att börja

Installera Aspose.Slides FOSS för Python:

pip install aspose-slides-foss

Grundläggande användning

import aspose.slides_foss as slides
from aspose.slides_foss.export import SaveFormat
from aspose.slides_foss.slideshow import TransitionType, TransitionSpeed

with slides.Presentation() as prs:
    transition = prs.slides[0].slide_show_transition
    transition.type = TransitionType.FADE
    transition.speed = TransitionSpeed.MEDIUM
    transition.advance_after = True
    transition.advance_after_time = 3000
    prs.save("slideshow.pptx", SaveFormat.PPTX)

Tips och bästa praxis

  • Alltid avlägsna dokumentobjekt efter användning
  • Handla filer I/O undantag när du läser eller skriver filerna
  • Se till att API referens För de senaste signaturerna

API Referens sammanfattning

ClassDescription
ISlideShowTransitionSe referensdokument
SlideSe referensdokument

För fullständig information, se den API referens.

See Also

 Svenska