python-pptx

How to change font size of text within a table created by Python-pptx

谁说胖子不能爱 提交于 2019-12-01 06:13:50
问题 I am creating a script to show graphs of product performance and creating a table to display its partnumber, a list of applications and the number of current applications. However, the default font size is much too large to get all of this information into the slide and needs to be reduced. How do I reduce the font size of text within a table in Python-pptx? This is what I have, but I keep getting an error "AttributeError: '_Cell' object has no attribute 'paragraph'" table = shapes.add_table

python-pptx: insert picture into content placeholder

穿精又带淫゛_ 提交于 2019-11-30 23:27:21
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 :) 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: >>> prs = Presentation() >>> slide = prs.slides.add_slide(prs.slide_layouts[8]) >>> placeholder =