<?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 Print Task ?mage in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/print-task-mage/m-p/185310#M4606</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: selcuktinaz&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using Silverlight 3.0 Api for sl. In my application i am using PrinTask. Map that is given to map, has 2 layer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1-FeatureLayer =&amp;gt; that has initialized,updated, and has only one graphic inside.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2-GraphicLayer &amp;gt;= that has 4 MapPoint graphic with TextSymbol&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map does not have any other thing. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I also made map's background Transparent. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I set feature Layer renderer property as SimpleRenderer that fill property = transparent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I did it for GraphicLayer too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my problem. Despite of all these settings, Picture that i received from PrintTask does not have transparent background. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I set PrintTask Format parameter as GIF or PNG32. But no solution. I add handled and wanted images to attachement&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in Advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Dec 2013 05:55:00 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2013-12-31T05:55:00Z</dc:date>
    <item>
      <title>Print Task ?mage</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/print-task-mage/m-p/185310#M4606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: selcuktinaz&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using Silverlight 3.0 Api for sl. In my application i am using PrinTask. Map that is given to map, has 2 layer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1-FeatureLayer =&amp;gt; that has initialized,updated, and has only one graphic inside.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2-GraphicLayer &amp;gt;= that has 4 MapPoint graphic with TextSymbol&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;map does not have any other thing. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I also made map's background Transparent. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I set feature Layer renderer property as SimpleRenderer that fill property = transparent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I did it for GraphicLayer too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my problem. Despite of all these settings, Picture that i received from PrintTask does not have transparent background. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I set PrintTask Format parameter as GIF or PNG32. But no solution. I add handled and wanted images to attachement&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in Advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2013 05:55:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/print-task-mage/m-p/185310#M4606</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-12-31T05:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Print Task İmage</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/print-task-mage/m-p/185311#M4607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: doopsterus&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my experience of using the print task I have not been able to get back an image that has a transparent background no matter what format I specify.&amp;nbsp; Here are two things you can try.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;For your case you show here it might be worth looking into the&lt;A href="http://imagetools.codeplex.com/" rel="nofollow noopener noreferrer" target="_blank"&gt; ImageTools&lt;/A&gt; library to see if you can remove white background from your print.&lt;/LI&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;LI&gt; You can generate the image on the client side.&amp;nbsp; I've done this on a much larger scale than what you are wanting to do, however, here is the trick to that.&amp;nbsp; &lt;/LI&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Upgrade to SL5. &lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;All of the images need to be coming from the same domain as the application otherwise you can't access the image pixels.&amp;nbsp; You need to use a &lt;A href="http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp/proxypage_net.zip" rel="nofollow noopener noreferrer" target="_blank"&gt;proxy&lt;/A&gt; like provide in this sample.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Create a childwindow with a viewbox which contains a new map control in it with the specified data and proportion to the final image size you want print.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Use the WritableBitmap and ImageTools to print the image to the correct image type and/or save it.&amp;nbsp; Here is some sample code below I threw together.&amp;nbsp; It might work.&amp;nbsp; Using this method I am able to create &lt;/LI&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var dpi = 192;
var image = new WriteableBitmap(YOUR_NEW_MAP_CONTROL, new System.Windows.Media.ScaleTransform { ScaleX = dpi / 96, ScaleY = dpi / 96 });
var ms = new MemoryStream();

var encoder = new PngEncoder();
var img = ImageExtensions.ToImage(image);
encoder.Encode(img, ms);

var bytes = ms.ToArray();
using (var stream = sfd.OpenFile())
{
&amp;nbsp;&amp;nbsp; stream.Write(bytes, 0, bytes.Length);
&amp;nbsp;&amp;nbsp; stream.Close();
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:24:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/print-task-mage/m-p/185311#M4607</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T09:24:01Z</dc:date>
    </item>
  </channel>
</rss>

