O'Reilly logo

Programming ArcGIS 10.1 with Python Cookbook by Eric Pimpler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting a list of available printers

Yet another list function provided by arcpy is ListPrinterNames(), which generates a list of the available printers. As is the case with the other list functions that we've examined, ListPrinterNames() is often called as a preliminary step in a multi-step script.

Getting ready

Before printing maps with the PrintMap() function, it is a common practice to call the ListPrinterNames() function, which returns a list of the available printers for the local computer. A particular printer can then be found by iterating through the list of printers and using it as an input to the PrintMap() function.

How to do it…

Follow these steps to learn how to use the ListPrinterNames() function to return a list of the available ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required