"exportOptions": { "dpi" : 300, "outputSize" : [ 500, 500 ] }
Solved! Go to Solution.
<resolution>96,150,266,300</resolution>
private var resol:String; [Bindable] private var exportDPI:IList;
private function init():void { if (configXML) { printTask.url = configXML.taskurl; printTask.getServiceInfo(); printButton.label = configXML.labels.submitlabel[0] || hostBaseWidget.getDefaultString("printSubmitLabel"); //My add resol = configXML.resolution; var resolArr:Array = resol.split(","); exportDPI = new ArrayCollection(resolArr); // End My Add } }
<s:DropDownList id="formatsDDL" width="100" dataProvider="{printTask.getServiceInfoLastResult.formats}" requireSelection="true"/> </mx:FormItem> <!--My add--> <mx:FormItem id="printDPI" label="Select DPI" width="100%" includeInLayout="true" visible="true"> <s:DropDownList id="dpiDD" width="100" selectedIndex="0" requireSelection="true" dataProvider="{exportDPI}"> </s:DropDownList> </mx:FormItem> <!--End My add--> <s:HGroup id="scaleFI"
<esri:PrintParameters id="printParameters" format="{formatsDDL.selectedItem}" layoutTemplate="{layoutTemplatesDDL.selectedItem}" map="{hostBaseWidget.map}" preserveScale="{scaleCheckbox.selected}"> <esri:exportOptions> <esri:ExportOptions dpi="{dpiDD.selectedItem}"/> </esri:exportOptions> <esri:layoutOptions> <esri:LayoutOptions id="layoutOptions"/> </esri:layoutOptions> </esri:PrintParameters>
import mx.collections.ArrayCollection;
private function basewidget_initializeHandler():void { if (isPartOfPanel) // if widget is part of "left", "right" or "bottom" panel { this.percentWidth = this.percentHeight = 100; wTemplate.percentWidth = wTemplate.percentHeight = 100; } else { wTemplate.width = 355; wTemplate.height = 290; //Any number above 290 will give enough room. wTemplate.minHeight = 168; } }
<widget label="Print" left="600" top="80" height="290" width="355" icon="assets/images/i_print.png" config="widgets/Print/PrintWidget.xml" url="widgets/Print/PrintWidget.swf"/>