mainPDF = r"c:\yourPath\pdfname.pdf" pdf = arcpy.mapping.PDFDocumentCreate(mainPDF) #Generate pdf to hold the pages #create a Search Cursor that filters to the pages you want & sorts on a field pageList = arcpy.SearchCursor(indexLayer, "\"Type\" = 'Type1'", None, None, "PageOrder A;") for page in pageList: pageNum = page.getValue("PageOrder") mxd.dataDrivenPages.currentPageID = pageNum #set the DDP page number tempPDF = "c:\\tempPath\\{0}.pdf".format(str(page.getValue("PageName"))) arcpy.mapping.ExportToPDF(mxd, tempPDF) #generate pdf of page mainPDF.appendPages(tempPDF) #add the page to the main pdf mainPDF.saveAndClose()
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.