I'm using python-pptx 0.6.0 and I created a slide with content with caption. I want to insert picture into the content placeholder but there is no attribute such as add_picture or insert_picuture to use. How can I add picture into this content placeholder? Thanks for answering my question :)
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
See the documentation on Understanding placeholders and Working with placeholders.
In brief, using something like this, you get the placeholder from the slide, then call
insert_picture
on the placeholder:Note that this only works with a picture placeholder. You'll need to replace any "general purpose" content placeholder with one specific to what you're going to insert.