HOW TO
In ArcGIS Pro, when a map series is exported to multiple PDF files, only one metadata title is applied to all exported files. This article describes the workflow to dynamically assign a unique title to each PDF file during the export process using Python. This workflow is only applicable for spatial map series.
Note: Ensure the pikepdf module is installed in a cloned environment before starting the workflow. Refer to ArcGIS API for Python: Using ArcGIS Pro 3.0 and later for more information.

icon to add a field.

Note: Avoid pressing Enter between lines, as it creates indentation errors. The full script must be run at once.
import arcpy, os, pikepdf
LAYOUT_NAME = "MapSeries_Layout" OUTPUT_FOLDER = r"C:\Users\Folder_path"
aprx = arcpy.mp.ArcGISProject("CURRENT")
layout = aprx.listLayouts(LAYOUT_NAME)[0]
ms = layout.mapSeries
if not ms or not ms.enabled:
raise RuntimeError("Map Series is not enabled on the layout.")
os.makedirs(OUTPUT_FOLDER, exist_ok=True)
for i in range(1, ms.pageCount + 1):
# Switch to the current Map Series page
ms.currentPageNumber = i
page_name = ms.pageRow.PageName
pdf_path = os.path.join(OUTPUT_FOLDER, f"{page_name}.pdf")
layout.exportToPDF(pdf_path)
with pikepdf.open(pdf_path, allow_overwriting_input=True) as pdf:
pdf.docinfo["/Title"] = f"Map Series Page – {page_name}"
pdf.save(pdf_path)
print(f"Updated PDF Title for: {page_name}")
print("Finished exporting and updating PDF titles.")
The following code shows the full sample script:
import arcpy, os, pikepdf
LAYOUT_NAME = "MapSeries_Layout"
OUTPUT_FOLDER = r"C:\Users\ana\Desktop\Exported PDF"
aprx = arcpy.mp.ArcGISProject("CURRENT")
layout = aprx.listLayouts(LAYOUT_NAME)[0]
ms = layout.mapSeries
if not ms or not ms.enabled:
raise RuntimeError("Map Series is not enabled on the layout.")
os.makedirs(OUTPUT_FOLDER, exist_ok=True)
for i in range(1, ms.pageCount + 1):
# Switch to the current Map Series page
ms.currentPageNumber = i
page_name = ms.pageRow.PageName
pdf_path = os.path.join(OUTPUT_FOLDER, f"{page_name}.pdf")
# --- EXPORT (ArcPy) ---
layout.exportToPDF(pdf_path)
# --- UPDATE PDF METADATA (pikepdf) ---
with pikepdf.open(pdf_path, allow_overwriting_input=True) as pdf:
pdf.docinfo["/Title"] = f"Map Series Page – {page_name}"
pdf.save(pdf_path)
print(f"Updated PDF Title for: {page_name}")
print("Finished exporting and updating PDF titles.")
The output below displays the unique metadata titles assigned to the exported PDF files.

Article ID: 000041542
Get help from ArcGIS experts
Start chatting now