I need to implement, within this very simple piece of code, the option that replicate the "Clip to output graphics extent" available from the ArcGIS 10.0 Export Map UI standard command. Is it possible? The purpose is to iterate a list of MXDs and export them their layout view to a graphic format.
mxd = arcpy.mapping.MapDocument(r"E:\XXX\\" + m) arcpy.mapping.ExportToPNG(mxd, outDir + '\\' + str(m))
Please note I need to export the Layout View and NOT the Data View.
I have further investigated and I think the solution probably lays along the following lines:
- extract from the DATAFRAME_ELEMENT its width and height
- change the page printer size according to the values above using suggestions from geonet.esri.com/thread/59446
- center the dataframe to the page margin
- export the layout to a graphic file.
I will try the approach above and publish any results.