I am attempting to use this geoprocessing script here. (The same result happens when I use the goeprocessing tool in Pro.)
Export Report To PDF—Data Management toolbox | Documentation
When exporting a report, the output pdf seems to get encrypted in a way that requires a password once sent over email.
I specify "NO_PASSWORD_PROTECT" and I can open the pdf with no password. But in File>Properties>Security tab, it says "Password Security" (see screenshot). Normally, that should say "No security", right?
When this pdf is emailed, gmail requires a password because it says it is "encrypted". But it shouldn't have any security at all. Am I doing the script wrong? Is it a setting in Pro in how it exports to a pdf?
Any ideas will be helpful. Thanks!
P.S. I'm using ArcGIS Pro 2.5
Solved! Go to Solution.
According to Esri help desk, this is a bug. But a work around is by following this workflow.
import arcpy
aprx = arcpy.mp.ArcGISProject(r"C:\Projects\USA_States\USA_States.aprx")
report = aprx.listReports("Counties Report")[0]
report.definitionQuery = definition_query
report.exportToPDF(r"C:\Project\USA_States\CA_Counties_Report.pdf")
This will export a pdf with no security on it.
According to Esri help desk, this is a bug. But a work around is by following this workflow.
import arcpy
aprx = arcpy.mp.ArcGISProject(r"C:\Projects\USA_States\USA_States.aprx")
report = aprx.listReports("Counties Report")[0]
report.definitionQuery = definition_query
report.exportToPDF(r"C:\Project\USA_States\CA_Counties_Report.pdf")
This will export a pdf with no security on it.