arcgis python pdf合并

一世执手 提交于 2019-11-27 12:19:24
# -*- coding: cp936 -*-

import arcpy, os, string

#Read input parameters from script tool
PDFList = 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 and append each PDF in the list
for eachPDF in PDFList:
    arcpy.AddMessage(u"合并"+str(eachPDF))
    outputPDF.appendPages(str(eachPDF))

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

#Remove variable reference to file
del outputPDF

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!