ArcGIS for Desktop

  • 文档
  • 合约
  • 支持

  • My Profile
  • 帮助
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS for Desktop

全面的专业性 GIS

ArcGIS for Server

面向企业的 GIS

ArcGIS for Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 合约
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

帮助

  • 主页
  • 入门
  • 制图
  • 分析
  • 管理数据
  • 工具
  • 更多...

PrintMap

  • 摘要
  • 讨论
  • 语法
  • 代码实例

摘要

将特定数据框或地图文档 (.mxd) 布局输出到打印机或文件。

讨论

PrintMap 用于将特定数据框或地图文档布局输出到系统打印机或打印文件。如果不提供打印机名称,PrintMap 将使用随地图文档保存的打印机或在地图文档未保存打印机的情况下使用默认系统打印机。

确定本地计算机中可用的打印机的简单方法是使用 ListPrinterNames 函数。

如果使用 ArcPress 进行打印,必须设置打印机属性并将打印机保存至地图文档。

注:

ArcGIS for Server 不支持基于驱动程序的打印。不过,web 应用程序支持基于非驱动程序的打印。有关详细信息,请参阅在 Web 应用程序中打印。

语法

PrintMap (map_document, {printer_name}, {data_frame}, {out_print_file}, {image_quality})
参数说明数据类型
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.

(默认值为 None)

String
data_frame

A variable that references a DataFrame object.

(默认值为 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.

(默认值为 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.

(默认值为 None)

String

代码实例

PrintMap 示例 1

以下脚本使用默认打印机选项打印地图。

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

以下脚本使用特定的打印机名称打印地图文档中的第一个数据框。

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 for Desktop

  • 主页
  • 文档
  • 合约
  • 支持

ArcGIS 平台

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • 内部人员博客
  • 用户大会
  • 开发者峰会
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | 隐私政策 | 法律声明