Environment:ArcGIS 10.0As v10 doesn't have out-of-box printing service, we are developing a simple one to export map layers to image (JPEG). The service is called in web browser.Input params:XMin, YMin, XMax, YMax, Scale, requiredImageWidth, requiredImageHeightOutput params:image urlexported image extent(XMin, YMin, XMax, YMax)sample code:
#configuration params
config.mxdTemplate = "test.mxd"
# Get the map document template
mapDoc = arcpy.mapping.MapDocument(config.mxdTemplate)
# Get data frame
dataFrames = arcpy.mapping.ListDataFrames(mapDoc)
dataFrame = dataFrames[0]
# Set map extent
newExt = dataFrame.extent
newExt.XMin = xMin
newExt.XMax = xMax
newExt.YMin = yMin
newExt.YMax = yMax
dataFrame.extent = newExt
dataFrame.scale = scale
#export
arcpy.mapping.ExportToJPEG(mapDoc, outputJpgPath,
data_frame=dataFrame,
df_export_width=inputImageWidth,
df_export_height=inputImageHeight)
so far the service has successfully exported map to JPEG file; but what is the way to get the actual extent represented by the exported image? The actual extent is different from the input extent. it is affected by dataFrame's extent and image size.any ideas? thanks!