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.
Asked
Active
Viewed 7,048 times
2 Answers
9
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)

jdhao
- 24,001
- 18
- 134
- 273
4
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

jdhao
- 24,001
- 18
- 134
- 273

K. Abhulimen
- 137
- 1
- 13
-
1Also found that I could import inches measurement and use that instead of the above measurement point which can be confusing. – K. Abhulimen Feb 15 '18 at 18:58