编程语言
首页 > 编程语言> > arcgis python pdf合并

arcgis python pdf合并

作者:互联网

# -*- 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

 

标签:string,outputPDF,python,eachPDF,arcgis,pdf,outPDFpath,GetParameterAsText,arcpy
来源: https://www.cnblogs.com/gisoracle/p/11362550.html