arcgis python 把多个MXD批量导出一个PDF

Posted gisoracle

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了arcgis python 把多个MXD批量导出一个PDF相关的知识,希望对你有一定的参考价值。

# -*- coding: cp936 -*-
import arcpy, os, string

#Read input parameters from script tool
mxdList = string.split(arcpy.GetParameterAsText(0), ";")
outPDFpath = arcpy.GetParameterAsText(1)

#Create a new PDF object to store the results
outputPDF = arcpy.mapping.PDFDocumentCreate(outPDFpath)

#Loop through each MXD in the list, export, create a temporary PDF name,
# and append to final, output PDF
for mxdPath in mxdList:
    mxd = arcpy.mapping.MapDocument(mxdPath)
    PDFPath = mxdPath[:-4] + "_gisoracle.pdf"
    arcpy.mapping.ExportToPDF(mxd, PDFPath)
    outputPDF.appendPages(str(PDFPath))
    os.remove(PDFPath)


#Save the changes and open the result automatically
outputPDF.saveAndClose()
os.startfile(outPDFpath)

#Remove variable reference to file
del outputPDF

 

以上是关于arcgis python 把多个MXD批量导出一个PDF的主要内容,如果未能解决你的问题,请参考以下文章

arcgis pro怎么发布mxd文件

arcgis多个面导出多个cad文件

关于arcgis的python脚本编程, shape文件出png图片问题

如何批量导出JPG格式的图片?

ArcGIS超级工具1.7升级说明2019-08-26

怎么把arcgis数据,导入到google Earth里面