Select to view content in your preferred language

ArcGIS Pro Export Report to PDF

1775
1
Jump to solution
04-28-2020 01:10 PM
DanielWebb
Frequent Contributor

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

0 Kudos
1 Solution

Accepted Solutions
DanielWebb
Frequent Contributor

According to Esri help desk, this is a bug.  But a work around is by following this workflow.

https://pro.arcgis.com/en/pro-app/arcpy/mapping/report-class.htm#C_GUID-06573247-ED69-4D1B-9DB4-639E...

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.

View solution in original post

0 Kudos
1 Reply
DanielWebb
Frequent Contributor

According to Esri help desk, this is a bug.  But a work around is by following this workflow.

https://pro.arcgis.com/en/pro-app/arcpy/mapping/report-class.htm#C_GUID-06573247-ED69-4D1B-9DB4-639E...

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.

0 Kudos