ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Ayuda
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plataforma de representación cartográfica para tu organización

ArcGIS Desktop

Un completo SIG profesional

ArcGIS Enterprise

SIG en tu empresa

ArcGIS Developers

Herramientas para crear aplicaciones basadas en la ubicación

ArcGIS Solutions

Plantillas de aplicaciones y mapas gratuitas para tu sector

ArcGIS Marketplace

Obtén aplicaciones y datos para tu organización.

  • Documentación
  • Soporte
Esri
  • Iniciar sesión
user
  • Mi perfil
  • Cerrar sesión

ArcMap

  • Inicio
  • Introducción
  • Cartografiar
  • Analizar
  • Administrar datos
  • Herramientas
  • Extensiones

PrintMap

  • Resumen
  • Debate
  • Sintaxis
  • Muestra de código

Resumen

Prints a specific data frame or a map document (.mxd) layout to a printer or file

Debate

PrintMap provides the ability to print a specific data frame or a map document layout to a system printer or a print file. If a printer name is not provided, PrintMap will use the printer that is saved with the map document or will use the default system printer if the map document does not have a printer saved.

An easy way to determine the printers that are available to the local computer is to use the ListPrinterNames function.

If you want to print using ArcPress, you must set up the printer properties and save the printer with the map document.

Nota:

Driver based printing is not supported on ArcGIS Server. However, non-driver based printing is supported in web applications. For more information, see Printing in web applications.

Sintaxis

PrintMap (map_document, {printer_name}, {data_frame}, {out_print_file}, {image_quality})
ParámetroExplicaciónTipo de datos
map_document

A variable that references a MapDocument object.

MapDocument
printer_name

A string that represents the name of a printer on the local computer.

(El valor predeterminado es None)

String
data_frame

A variable that references a DataFrame object.

(El valor predeterminado es PAGE_LAYOUT)

DataFrame
out_print_file

A path that includes the name of an output print file. The format created is dependent on the printer. If you are using a postscript printer, the format will be postscript, and it is recommended that a .ps extension be provided; if you are using a Windows printer, use a .prn extension.

(El valor predeterminado es None)

String
image_quality

A string that defines output image quality, the draw resolution of map layers that draw as rasters. Using the default value of "None" will cause the function to use the image quality saved in the map document.

  • BEST —An output image quality resample ratio of 1.
  • BETTER —An output image quality resample ratio of 2.
  • NORMAL —An output image quality resample ratio of 3.
  • FASTER —An output image quality resample ratio of 4.
  • FASTEST —An output image quality resample ratio of 5.

(El valor predeterminado es None)

String

Muestra de código

PrintMap example 1

The following script prints a map using the default printer options.

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
arcpy.mapping.PrintMap(mxd)
PrintMap example 2

The following script prints the first data frame within a map document using a specified printer name.

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
df = arcpy.mapping.ListDataFrames(mxd)[0]
arcpy.mapping.PrintMap(mxd, r"\\olyfile\OLYCanon", df)

ArcGIS Desktop

  • Inicio
  • Documentación
  • Soporte

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

Acerca de Esri

  • Quiénes somos
  • Empleo
  • Blog de Esri
  • Conferencia de usuarios
  • Cumbre de desarrolladores
Esri
Díganos su opinión.
Copyright © 2021 Esri. | Privacidad | Legal