Working with Presentation Content

Arbeta med Presentation Content -- Aspose.Slides FOSS för Python

Aspose.Slides FOSS for Python provides classes for working with working with presentation content.


Overview

De viktigaste klasserna är:

  • Presentation

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 import ShapeType
from aspose.slides_foss.export import SaveFormat

with slides.Presentation() as prs:
    slide = prs.slides[0]
    shape = slide.shapes.add_auto_shape(ShapeType.RECTANGLE, 50, 50, 300, 100)
    shape.add_text_frame("Aspose.Slides FOSS")
    prs.save("content.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
PresentationSe referensdokument

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

See Also

 Svenska