I'm usually creating maps for (different aspects of) reports of large infrastructure projects. Layers and attributes tend to change back and forth as time goes by, and I'm forced to create new versions of these maps regularly.
The problem is that in each project I have some 50-60 mxd files, some with very small changes. What makes it even more complicated, all of the produced maps should have the same date (and an overall very strict layout) according to that specific project's end date. Even with a very thought-through naming convention, it can sometimes be a real pain to find out which mxd belongs to a certain map that I am tasked to update.
Is there a way to automatically write the path of the mxd (and preferably the date of export) to a pdf and/or a png file somewhere in the metadata when exporting from ArcMap?
The information should not be visible when printed, nor could the file name be used for this (since it will change multiple times), but should also not be too complicated to find when looking for it. The process of exporting a pdf/png in this way should be reasonably fast, since I'll be doing it several times a day.
Does such metadata exist within pdf files and/or png files, and how can I access it?
arcpy
for export of .pdf documents, there is a methodupdateDocProperties()
desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/… which you can use to set .pdf file metadata such as subject (which can contain the titile of mxd you are exporting). If your workflow is based on external pdf generation library (I usereportlab
a lot) such aspypdf
, then you can also set metadata in Python code when constructing pdf document objects.