Hi all,
I'm trying to export a report to PDF via report.exportToPDF (as described into help section). The script works fine but the created PDF's size is too big (~50 Mb) because all the pages of the report are rasterized.. Comparing with the file created via UI (ArcGIS Pro -> Report -> Share as PDF) which is about ~600 kb.. cause this file is in "vector" normal PDF format (except for small pictures with logo).
So, the question: is it possible to export report into PDF via arcpy the same way like from ArcGIS Pro UI?
I'm using latest version of ArcGIS Pro 2.3.2. and default python 3 environment.
Example of the code:
import arcpy, datetime, os
# Set parameters for the main report & create PDF
aprx = arcpy.mp.ArcGISProject(r"c:\NGM_GIS\NG_Projects_all\NG_Projects_all.aprx")
report = aprx.listReports("TenementExtract Report TEST A3")[0]
outPDF_report = r"c:\NGM_GIS\NG_Projects_all\ReportTEST\NG Tenement Report A3.pdf"
if os.path.exists(outPDF_report): os.remove(outPDF_report)
report.exportToPDF(outPDF_report)
print("PDF report is created!")
I've already tried to insert different parameters into report.exportToPDF e.g.
1) compress_vector_graphics=True,
2) embed_fonts=True
3) image_compression = "NONE"
- always receive the same result...
P.S. in contrast exportToPDF works perfect with Layouts.