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.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With