Merging pdf files based on a value in a field

accessnewbie at gmail.com accessnewbie at gmail.com
Fri Sep 8 18:28:56 EDT 2017


The StoreID (unique) is in Column1, a pdf map location in Column2, and the file name is "Warehouse1" (this will vary). (names not really sequenced numerically)

County1     C:/maps/map1.pdf 
County1     C:/maps/map2.pdf
County2     C:/maps/map1.pdf
County2     C:/maps/map3.pdf
County3     C:/maps/map3.pdf
County4     C:/maps/map2.pdf
County4     C:/maps/map4.pdf

Is it possible to append the pdf maps with the same county and naming the new pdf file grouped by the value in the county field and the file name?

Output would be something like this:
C:\maps\final\County1_Warehouse1.pdf (pdf file is map1.pdf and map2.pdf)
C:\maps\final\County2_Warehouse1.pdf (pdf file is map1.pdf and map3.pdf)
C:\maps\final\County3_Warehouse1.pdf (pdf file is map3.pdf)
C:\maps\final\County4_Warehouse1.pdf (pdf file is map2.pdf and map4.pdf)

Right now the data is in a database but I can export this info into any format needed.

Ideas as to how to do this?



More information about the Python-list mailing list