Select to view content in your preferred language

Setting print extent in (geoprocesisng) print service

611
0
06-24-2013 06:12 AM
by Anonymous User
Not applicable
Original User: vdkamp

Based on the Advanced high-quality web map printing I setup a printing service. Now I want to change the extent of the printed area to a new extent with also a different aspect ratio.

After

df = arcpy.mapping.ListDataFrames(mapDoc, 'webmap')[0]

I added:

printExtent = df.extent
printExtent.XMin = myXMin
printExtent.XMax = myXMax
printExtent.yMin = myYMin
printExtent.yMax = myYMax
df.extent = printExtent

When running I get an error. When I view the log messages on the server it says 'Error executing tool ... in df.extent = printExtent ... in _set return setatrr(self._arc_object,attr_name, cval(val)) RuntimeError: DataFrameObject: Error in setting extent Faile to execute ...'.

Even printExtent = df.extent and df.extent = printExtent, so without changes the extent, gives already this error message.

The print service is called from a Flex application based on the ESRI Flex Viewer.


What can be the problem? Am I on the right way when I want to print with a different zoom factor than the data in the viewer is in and with a different aspect ration than used in the template?
Tags (2)
0 Kudos
0 Replies