Printing maps with PrintMap()

Sending your map layout to a printer is easy with the PrintMap() function. By default, the print job will be sent to the default printer saved with the map document, but you can also define a specific printer where the job should be sent.

Getting ready

arcpy.mapping provides a PrintMap() function for printing page layouts or data frames from ArcMap. Before calling PrintMap(), it is a common practice to call the ListPrinterNames() function. A particular printer can then be found by iterating the list of printers and used as an input to the PrintMap() function.

PrintMap() can print either a specific data frame or the page layout of a map document. By default, this function will use the printer saved with the map document ...

Get Programming ArcGIS 10.1 with Python Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.