<div dir="ltr">I have a bunch of polygons that represent 8.5 x 11 printed map sheets.  I'd like to produce images for each sheet that best fits the polygon within the outputted image.  We've tried using mapscript by setting the map extent based on the bbox of the source polygon and rotation but results aren't great depending on the orientation of the source polygon.  Is there a way to set the "extent" based on a polygon? </div>