问题
Am trying to fit multiple charts into a python generated slide but I need the size of the slide to be wider. I looked through the available documentation provided which aren't much.
回答1:
I was able to resolve this by adjusting the width and height size of the prs
prs = Presentation()
prs.slide_width = 11887200
prs.slide_height = 6686550
回答2:
The default width and height for a slide generated by pptx is 10 inches width and 7.5 inches height. The following code will work to change its default slide width and height:
from pptx import Presentation
from pptx.util import Inches
prs = Presentation()
# set width and height to 16 and 9 inches.
prs.slide_width = Inches(16)
prs.slide_height = Inches(9)
来源:https://stackoverflow.com/questions/48604491/how-to-increase-the-slide-size-a-python-generated-powerpoint-presentation-using