Reputation: 23
I want to change the orientation to landscape for only certain pages in the word that I'm creating using python-docx. Is this possible? If yes, how? If no, is there any other option to do the same?
Upvotes: 1
Views: 3620
Reputation: 28903
Page orientation is specified on a section-by-section basis. So if you want to change back and forth, you'll need to add a section break at each point you want to change from portrait to landscape or vice versa.
This page in the documentation should give you what you need.
http://python-docx.readthedocs.io/en/latest/user/sections.html
Upvotes: 1