เริ่มต้นใช้งาน

ส่วนนี้ครอบคลุมทุกอย่างที่คุณต้องการเพื่อเตรียม Aspose.Slides FOSS สำหรับ Python และเขียนการนำเสนอแรกของคุณ.

ในส่วนนี้

หน้าคำอธิบาย
การติดตั้งติดตั้ง aspose-slides-foss โดยใช้ pip, ตั้งค่า virtual environment, ตรวจสอบการติดตั้ง, และรันสคริปต์เริ่มต้นอย่างรวดเร็ว.
ใบอนุญาตรายละเอียดของ MIT License: ฟรีสำหรับการใช้งานทุกประเภท, ไม่ต้องใช้ API key, ไม่ต้องลงทะเบียน.

การติดตั้งอย่างรวดเร็ว

pip install aspose-slides-foss

ต้องการ Python 3.10 หรือใหม่กว่า. The lxml dependency จะถูกติดตั้งโดยอัตโนมัติ.

ตัวอย่างทำงานขั้นต่ำ

import aspose.slides_foss as slides
from aspose.slides_foss.export import SaveFormat
from aspose.slides_foss import ShapeType

with slides.Presentation() as prs:
    slide = prs.slides[0]
    shape = slide.shapes.add_auto_shape(ShapeType.RECTANGLE, 50, 50, 400, 120)
    shape.add_text_frame("Hello, Aspose.Slides FOSS!")
    prs.save("output.pptx", SaveFormat.PPTX)

ควรใช้เสมอ Presentation ภายใน with บล็อกเพื่อให้แน่ใจว่าการทำความสะอาดทำอย่างถูกต้อง.

ขั้นตอนต่อไป

หลังการติดตั้ง, ดูที่ คู่มือผู้พัฒนา สำหรับคู่มือฟีเจอร์ที่ครอบคลุม shapes, text formatting, tables, fill, effects, speaker notes, comments, และ document properties.

 ภาษาไทย