I am trying to figure out how to automatically merge pdf files based on a stringpart (*wildcard) in the filename, without loosing selectable layers within a pdf.
I created 3 series of layout pages with the data driven pages tool. All series include the same index features but there are different layers/raster datasets in the background (topics are: landuse, climate change, site preservation). For each topic and index feature I have already exported several multiple pdfs which include the topic and index page name. Now I would like to merge the pdfs for each feature, like:
landuse_feature1.pdf + climatechange_feature1.pdf + sitepreservation_feature1.pdf = map_feature1.pdf
landuse_feature2.pdf + climatechange_feature2.pdf + sitepreservation_feature2.pdf =
map_feature2.pdf
...
landuse_(*wildcard).pdf + climatechange_(*wildcard).pdf +
sitepreservation_(*wildcard).pdf = map_(*wildcard).pdf
After a lot of research I found a free tool in the internet called "pdftk" which seemed to work just fine, but after merging the pdfs all selectable layers/layer informations were gone.
So, I know that there is a way to append single pdfs to a multipage pdf with arcpy, but since I have more than thousands of pdfs to merge, this is not an option for me.
Does maybe anybody had to struggle with this problem before and knows if and how it is possible to use a wildcard for merging pdfs with arcpy?