Reputation: 81
Let's say I have a list of students (names) and their corresponding photos, as well as some grades for the students. How can I insert the student's desired photo as a background picture for some or all of the slides, insert their names on JUST the title slide and insert their grades on select slides?
How should I go about this in python if I want to edit a base template powerpoint for each student with their corresponding information?
Upvotes: 8
Views: 20489
Reputation: 188
You can use python-pptx library. It is a Python library for creating and updating PowerPoint (.pptx) files.
This includes:
Round-trip any Open XML presentation (.pptx file) including all its elements Add slides Populate text placeholders, for example to create a bullet slide Add image to slide at arbitrary position and size Add textbox to a slide; manipulate text font size and bold Add table to a slide Add auto shapes (e.g. polygons, flowchart shapes, etc.) to a slide Add and manipulate column, bar, line, and pie charts Access and change core document properties such as title and subject
Link for download: https://pypi.org/project/python-pptx/
Link for documentation: https://python-pptx.readthedocs.io/en/latest/
Upvotes: 8