Hello,
I try to export a PDF with a scheduled task that runs in an arcgis server's server.
The ExportToPDF line of code crashes without any error with the python from ArcGIS Server, but works great with the python from ArcGIS Pro in other environments...
Here is a simple code test I made, it's crashing in the last line :
import arcpy
aprx = arcpy.mp.ArcGISProject(r"D:\path...\exportToPDF.aprx")
m = aprx.listMaps("Map")[0]
layout ="Test"
lyt = aprx.listLayouts(layout)[0]
mf = lyt.listElements("mapframe_element", "WEBMAP_MAP_FRAME")[0]
extent = arcpy.Extent(446998.96875, 214866.71875, 446579.875, 215163.046875)
mf.camera.setExtent(extent)
m.defaultCamera = mf.camera
lyt.exportToPDF(out_pdf=r"D:\path...\out.pdf")
Working with Pro 3.3
Not working with Server 11.3
Any idea ?