<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Error in Printing the map in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-in-printing-the-map/m-p/652395#M14517</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi EveryBody !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to create a widget for printing, like the one existing in the viewer. the problem is when I print the map, I get only a small part of it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Attached the source code of the widget and a snapshot of the problem occured.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;could you please show me what is wrong in my code ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for your info, when I put the code of the function &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;printMap()&lt;/SPAN&gt;&lt;SPAN&gt; in the same file as the map (the main component), it works nice !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Feb 2012 12:56:21 GMT</pubDate>
    <dc:creator>Mohammed_YassineAYACHE</dc:creator>
    <dc:date>2012-02-13T12:56:21Z</dc:date>
    <item>
      <title>Error in Printing the map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-in-printing-the-map/m-p/652395#M14517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi EveryBody !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to create a widget for printing, like the one existing in the viewer. the problem is when I print the map, I get only a small part of it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Attached the source code of the widget and a snapshot of the problem occured.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;could you please show me what is wrong in my code ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for your info, when I put the code of the function &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;printMap()&lt;/SPAN&gt;&lt;SPAN&gt; in the same file as the map (the main component), it works nice !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 12:56:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-in-printing-the-map/m-p/652395#M14517</guid>
      <dc:creator>Mohammed_YassineAYACHE</dc:creator>
      <dc:date>2012-02-13T12:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Printing the map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-in-printing-the-map/m-p/652396#M14518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: rscheitlin&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mohammed,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I tested your code and got it to produce a whole map without changing anything... How are you calling the code you provided?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private var printWin:PrintWidgetWindow;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private function showPrint():void
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printWin = PopUpManager.createPopUp(this, PrintWidgetWindow,false) as PrintWidgetWindow;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; printWin.map = myMap;&lt;/STRONG&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PopUpManager.centerPopUp(printWin);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:39:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-in-printing-the-map/m-p/652396#M14518</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T03:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Printing the map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-in-printing-the-map/m-p/652397#M14519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm calling the printWidget within a toolsController like this : &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
&amp;nbsp;&amp;nbsp; xmlns:s="library://ns.adobe.com/flex/spark" 
&amp;nbsp;&amp;nbsp; xmlns:mx="library://ns.adobe.com/flex/mx"&amp;gt;
 
 
 &amp;lt;fx:Script&amp;gt;
&amp;nbsp; &amp;lt;![CDATA[
&amp;nbsp;&amp;nbsp; import com.esri.ags.Map;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; import mx.events.CloseEvent;
&amp;nbsp;&amp;nbsp; import mx.managers.PopUpManager;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; [Bindable]
&amp;nbsp;&amp;nbsp; public var printWidgetOpen:Boolean = false;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private var printWid:PrintWidget;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; public var map:Map;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; protected function hgroup1_rollOutHandler(i:Image):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; i.width = 30;
&amp;nbsp;&amp;nbsp;&amp;nbsp; i.height = 30;
&amp;nbsp;&amp;nbsp; }


&amp;nbsp;&amp;nbsp; protected function hgroup1_rollOverHandler(i:Image):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; i.width = 45;
&amp;nbsp;&amp;nbsp;&amp;nbsp; i.height = 45;
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; protected function printIcon_clickHandler(event:MouseEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!printWidgetOpen){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printWid = PopUpManager.createPopUp(parent, PrintWidget,false) as PrintWidget;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printWid.map = map;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printWid.addEventListener(CloseEvent.CLOSE,printCloseHandler, false, 0, true);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PopUpManager.centerPopUp(printWid);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printWidgetOpen = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; protected function printCloseHandler(event:CloseEvent):void{
&amp;nbsp;&amp;nbsp;&amp;nbsp; printWidgetOpen = false;
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp; ]]&amp;gt;
 &amp;lt;/fx:Script&amp;gt;
 
 
 &amp;lt;s:BorderContainer width="20" height="160" cornerRadius="10" backgroundAlpha="0.8" backgroundColor="#333333" borderAlpha="0.9" borderColor="#222222" borderStyle="solid" borderVisible="true" borderWeight="3"&amp;gt;
&amp;nbsp; &amp;lt;mx:VBox width="100%" height="100%" horizontalAlign="left" verticalAlign="middle"&amp;gt;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; &amp;lt;!--Print Button--&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;s:HGroup width="25" height="30"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gap="2"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; horizontalAlign="left"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; verticalAlign="middle"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:Line id="printLine" height="25"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; includeInLayout="{printWidgetOpen}"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visible="{printWidgetOpen}"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:stroke&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:SolidColorStroke caps="square" color="#ede00a" weight="2"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/s:stroke&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/s:Line&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mx:Image id="printIcon" resizeEffect="Resize"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width="30" height="30"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; buttonMode="true"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; smoothBitmapContent="true"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; useHandCursor="true"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; source="@Embed('assets/images/i_print.png')"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; click="printIcon_clickHandler(event)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; toolTip="Impression"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rollOut="hgroup1_rollOutHandler(printIcon)"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rollOver="hgroup1_rollOverHandler(printIcon)"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; &amp;lt;/s:HGroup&amp;gt;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp; &amp;lt;/mx:VBox&amp;gt;
 &amp;lt;/s:BorderContainer&amp;gt;
&amp;lt;/s:Group&amp;gt;

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and the toolsController is called in the main component like this : &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;widgets:ToolsController map="{mainMap}" left="30" bottom="60" /&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:39:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-in-printing-the-map/m-p/652397#M14519</guid>
      <dc:creator>Mohammed_YassineAYACHE</dc:creator>
      <dc:date>2021-12-12T03:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Printing the map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-in-printing-the-map/m-p/652398#M14520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: yassine.dev&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I built a simple project to demonstrate the problem I have, it is attached to this post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NB: when I execute this project using the Flex SDK 4.1, I get the problem described in my first post. and when I execute it with the SDK 4.6, I get the whole map printed but I don't get the copyright label !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 22:14:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-in-printing-the-map/m-p/652398#M14520</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-02-13T22:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Printing the map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-in-printing-the-map/m-p/652399#M14521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think the problem is solved. I just changed these lines : &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;this.addElement(printBox); &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;this.removeElement(printBox);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;by :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;this.parent.addChild(printBox);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;this.parent.removeChild(printBox);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Attached the modified version of the test project if someone want to use it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll be very thankful for any advise to improve this widget.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 22:55:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/error-in-printing-the-map/m-p/652399#M14521</guid>
      <dc:creator>Mohammed_YassineAYACHE</dc:creator>
      <dc:date>2012-02-13T22:55:15Z</dc:date>
    </item>
  </channel>
</rss>

