Select to view content in your preferred language

Export Multiple Layouts to .pdf/.emf etc in ArcGIS Pro

11187
18
05-10-2018 08:07 AM
Status: Open
Labels (1)
SeanHlousek
Frequent Contributor

It would be a nice feature to select multiple layouts and then right-click and choose "Export All".  (To .pdf or other formats).  

Then, while ArcGIS Pro is exporting the different layouts be able to continue working as this process is handled in the background.

Basically a "Batch Export" is what I'm suggesting.

18 Comments
ElishevaWalters

Yes, this is VERY IMPORTANT to speed up workflow

caleb-thomas-smith

Yes! This would be very helpful, especially for the GIS students I TA who are creating 10-12 layouts per lab.

bsanders69

As someone has mentioned, there is a method out there that you provide a folder and it will open, save (to update all dynamic texts, etc.) and export to pdf every ArcMap file layout in the map folder (may be 200 maps in a folder, but the amount of time saved is significant!  Different folder structure now as the new layouts are within the Pro folder structure, but, I agree that this functionality was utilized constantly updating the City Police, Fire, Code, Engineering, City Council, Parks, etc. wall maps.  Please bring back a way to batch export these layouts.

Thank you

DaveTaylor011

Hey folks,

I realize this is an older thread, but I've actually created some Python scripts to handle this (I make a lot of layouts). I've copied the code for the Batch Export to PDF tool below, and the toolbox includes this and a Batch Export to PNG tool too. You can download the toolbox here: https://drive.google.com/file/d/1tYhxNO8SOimc5h_N2BqXg4097Rx7ymrl/view?usp=sharing. I suggest using the toolbox because it took a little while to set up all the parameters for the PDF tool. Both tools export only from the current open project, and use value tables so you can export as many layouts as you want and name the output files however you want. Hopefully this helps someone!

 

#-------------------------------------------------------------------------------
# Name: Batch Export Layout to PDF
# Purpose: Generate Layout PDFs in bulk.
#
# Author: Dave Taylor
#
# Created: 2022-05-11
# Copyright: (c) Dave Taylor 2022
#-------------------------------------------------------------------------------

import arcpy, os, sys
arcpy.env.overwriteOutput = True
aprx = arcpy.mp.ArcGISProject("CURRENT")
listLayouts = aprx.listLayouts()

inputRows = arcpy.GetParameter(0)
outputFolder = arcpy.GetParameter(1)
clipToGraphicsExtent = arcpy.GetParameter(2)
outputAsImage = arcpy.GetParameter(3)
imageCompression = arcpy.GetParameter(4)
compressionQuality = arcpy.GetParameter(5)
compressVectorGraphics = arcpy.GetParameter(6)
resolution = arcpy.GetParameter(7)
imageQuality = arcpy.GetParameter(8)
embedFonts = arcpy.GetParameter(9)
exportGeoreferenceInformation = arcpy.GetParameter(10)
layersAndAttributes = arcpy.GetParameter(11)
embedColourProfile = arcpy.GetParameter(12)

tbleRow = 0
numRows = inputRows.rowCount
arcpy.AddMessage ("Generating "+str(numRows)+" PDFs . . .")

while tbleRow < numRows:
rowStr = inputRows.getRow(tbleRow)
rowSplit = rowStr.split("' '")
rowClean = [s.replace("'","") for s in rowSplit]
layoutName = rowClean[0]
exportName = rowClean[1]
arcpy.AddMessage (layoutName)
arcpy.AddMessage (exportName)
for lyt in listLayouts:
if lyt.name == layoutName:
'''outputPDF = lyt.exportToPDF(os.path.join(str(outputFolder),str(exportName)))'''
outputPDF = lyt.exportToPDF(os.path.join(str(outputFolder),str(exportName)),resolution,imageQuality,compressVectorGraphics,imageCompression,embedFonts,layersAndAttributes,exportGeoreferenceInformation,compressionQuality,clipToGraphicsExtent,outputAsImage,embedColourProfile)
tbleRow += 1

KyleGonterwitz

I agree batch exporting layouts to pdf is a great idea, and it was pretty easy to do with python, here is an example in a python notebook

https://github.com/gontek/CMED/blob/main/LayoutExport.ipynb

In this example rather than export all layouts I am controlling the desired layouts to be output by explicitly listing those layouts by name.  To export all layouts I suppose you could change the logic to "not in" on line 9 and have an empty list.

SuzyFer

@DaveTaylor011 I have been using your toolbox for batch PDF export and it works great! One thing I was wondering about - it doesn't take map series into consideration. Some of my layouts might have map series included and some just individual pages, but with the tool I can only get the first page of a map series as PDF. I wonder if there is something that can be added to the code to include also map series.

DaveTaylor011

@SuzyFer that's a good one! I'll scratch my head a bit and see if I can add a map series option to it. Stay tuned!

ShannonJ

I'd like to add my support for this as well as some functionality I think would be ideal. I agree that that export multiple layouts should have been introduced by now. Being able to have multiple layouts in a project is a huge improvement over ArcMap, one of my favourite improvements as someone who does a lot of map production. The only thing missing is the ability to export all or some of them with a single click.

I'd like to see an export multiple layouts option where I can choose which layouts in my project are exported, and if they are exported to a single pdf or multiple pdfs. In a perfect world, I can export  multiple pdfs at a time with a combination of layouts.

Real world example: I have a project with layouts A,B,C,D,E, and F. Currently I have to export all six layouts individually, then use adobe acrobat to combine layout A and B, layout C and D, and layout E and F for submission. This is a common practice for me  and being able to export multiple PDF's would eliminate a lot of time in this process.

While I appreciate that some users on this thread have created and shared tools (which I will be taking advantage of in the mean time!), I believe a lot of users would benefit from this functionality being built into ArcGIS pro. Hopefully we can revive this thread and draw some attention to it!