Karan Maheshwari
Karan Maheshwari

Reputation: 23

How to change page orientation to landscape?

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

Answers (1)

scanny
scanny

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

Related Questions