Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Judging from the answer to this question, one cannot change the page size etc from ArcPy, so I set up my "template" mxds so my script can save a new copy of it, change data sources etc. This methods works perfectly for my A4 maps.

However, my A0 mxds are losing the printer and page settings from the template. My A0_template.mxd is set to print from the plotter on A0 paper using the default printer settings. After the copy of the mxd is produced and I open it, the printer has somehow changed to the normal small printer with the paper size matching the default tray. I am simply using the saveACopy(filename) method which is part of the MapDocument class. Why would the correct settings for the A4 mxd be saved, but not for the A0?

share|improve this question
2  
this problem happens to me using the save() too, any solution ? –  geogeek Sep 16 '12 at 14:48
    
Thank you, I thought I was going crazy. I haven't found a solution, it's still bugging me that I have to physically open the A0 document myself and change the settings. I'm thinking it's do with the fact that the plotter is not the default printer, so when it saves the new mxd and finds that the printer is not the default, it changes it to the default. –  Arabella Sep 18 '12 at 5:16
    
yes the problem comes from the default printer, in my case i'm PDF creator, now when i set PDF creator to default printer, it works Fine. –  geogeek Sep 19 '12 at 7:45
    
So in your script/model, do you set the printer you want as the default printer before save()? –  Arabella Sep 19 '12 at 8:16
    
no,i set the default printer throught "windows printers" , then the default printer is used in arcgis by default –  geogeek Sep 19 '12 at 8:52
show 2 more comments

1 Answer 1

Bug and workaround with arcview 10.0: when using the save() or the saveACopy(filename) functions, the mxd paper size must be present in the windows default printer settings. If not, these functions will replace the current page settings with a default A4.

Easiest workaround: change default printer before save operation.

win32print.SetDefaultPrinter(printer) should be helpfull to programatically change the default printer.

share|improve this answer
    
Welcome to the site :) –  Conor Feb 6 at 14:20
add comment

Your Answer

 
discard

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.