How to get at Printer Settings with arcpy

374
1
06-27-2011 03:08 PM
RandyKreuziger
Occasional Contributor III
This is my first try with map automation so I'm starting small.  I just want to print out all the mxds in a directory.  I started testing with just one MXD and I'm already having problems.  Can you configure printer / page settings with arcpy? 

My test MXD is a color 9.3 MXD, with 11x17 format.  It keeps coming out on 4 8.5x11 sheets of paper in B/W.  I've saved the MXD after setting the color and page size but when I go back in those settings are lost.  Any ideas?



import arcpy.mapping as map
mxd = map.MapDocument(r"H:\Data Release\sect_s28t23r41e\maps\phshalebuffsect.mxd")
printerName = "\\\\DFWPSOLY01\\DFWHN5W5185b"
map.PrintMap(mxd, printerName, "PAGE_LAYOUT")
del mxd
0 Kudos
1 Reply
KimOllivier
Occasional Contributor III
You will probably have to define a custom printer and set the defaults to the settings required and then print to that. You will need administrator access so it may not be a solution.

Otherwise you might be able to do it in Python using the win32print module in PythonWin. Have a look at the help in PythonWin for details. I have not got this working myself.
0 Kudos