Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need my script to access the Page Orientation property of the current MXD, and switch it from portrait to landscape (or back).

I've looked through the ArcGIS 10 arcpy and arcpy.mapping documentation, and haven't had any luck.

Does anyone know how to do this?

share|improve this question

Sadly the answer is no. sorry

Even from ESRI Staff:

"There are currently no properties to read/change the page size using arcpy.mapping. As a workaround, you could create MXDs for each page size and oreintation you needed. The closest example I can think of is the "Creating a map book with facing pages" help topic. It doesnt use different pages sizes, however, it does use two MXDs, one for right facing pages, one for left facing pages. In your case, you may have one MXD for letter size, and one MXD for legal size, as an example."

Possible Workaround is:

share|improve this answer

Can't do it yet in 10.0 from arcpy.mapping, going to have to use .Net or comtypes.

share|improve this answer
I can change the page orientation using only hotkeys. Would there be a way to simulate keypresses in my python script? – Tanner Aug 27 '10 at 21:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.