Aspose.Slides สำหรับ Python ผ่าน .NET
Aspose.Slides for Python via .NET เป็นไลบรารี Python สำหรับการสร้าง, อ่าน, แก้ไขและแปลงงานนำเสนอ PowerPoint และ OpenDocument โดยไม่ต้องใช้ Microsoft PowerPoint หรือ Microsoft Office.
มันสามารถโหลดและบันทึกไฟล์ PPT, PPTX, PPS, POT และ ODP รวมถึงรูปแบบที่เปิดใช้งานมาโครและเทมเพลต และสามารถส่งออกเป็น PDF, XPS, HTML, SVG, TIFF, Markdown และรูปภาพ.
เริ่มต้นใช้งาน
เริ่มต้น
ประเมินผล
สร้างด้วย Slides
ภารกิจทั่วไป
ขั้นตอนการทำงานกับ Slides
ตัวอย่าง
อ้างอิง & การสนับสนุน
อ้างอิง
สนับสนุน
การนำเสนอแรกของคุณ
Install the package from PyPI:
pip install aspose.slides
แพ็กเกจนี้รวม .NET runtime ที่ใช้ไว้ด้วย จึงไม่จำเป็นต้องติดตั้ง .NET บน Linux ให้ติดตั้งไลบรารี libgdiplus และ ICU ด้วย และสำหรับ Python ของระบบบน Debian หรือ Ubuntu ให้รันคำสั่งในสภาพแวดล้อมเสมือน macOS มีข้อกำหนดเพิ่มเติมและเรายังไม่ได้ตรวจสอบการติดตั้งบนระบบนั้น ดูที่ การติดตั้ง สำหรับคำสั่ง, ข้อกำหนดของ macOS, และเวอร์ชัน Python ที่รองรับ.
Save this code as hello.py:
import aspose.slides as slides
# สร้างอินสแตนซ์ของคลาส Presentation ที่แสดงถึงไฟล์การนำเสนอ.
with slides.Presentation() as presentation:
# ดึงสไลด์แรก.
slide = presentation.slides[0]
# เพิ่มรูปทรงอัตโนมัติประเภท CLOUD.
auto_shape = slide.shapes.add_auto_shape(slides.ShapeType.CLOUD, 20, 20, 200, 80)
auto_shape.text_frame.text = "Hello, Aspose!"
# บันทึกการนำเสนอเป็นไฟล์ PPTX.
presentation.save("new_presentation.pptx", slides.export.SaveFormat.PPTX)
Run it with python hello.py. The script saves new_presentation.pptx in the current folder, with one slide holding a cloud shape that reads “Hello, Aspose!”. Without a license, the saved file carries an evaluation watermark — see การให้สิทธิ์ใช้งาน. For more ways to create and fill a presentation, see สร้างการนำเสนอ.