1

I often write PDF files using ArcPy with ArcGIS Pro 2.0 using code like:

import arcpy
aprx = arcpy.mp.ArcGISProject(r"C:\temp\test.aprx")
lyt = aprx.listLayouts("Layout")[0]
lyt.exportToPDF(r"C:\temp\test.pdf")

I view them using Adobe Acrobat Reader DC, and when I close them I am asked:

Do you want to save changes to 'test.pdf' before closing?

This means every close is two clicks instead of one, and I am not making any changes to the PDF so I am always choosing No.

I have not been able to disable this dialog being triggered from the Adobe side and am wondering whether there is a way to set a property on the PDF created by ArcGIS Pro to prevent it instead?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.