<?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 Re: Printing not working in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306706#M7921</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you try with a popup?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I remember, I think there is no limitation to the screen size with a popup.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And for sure the sample I pointed out is working when printing (with or without preview) to a printer bigger than the screen (A2, A1, A0).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Feb 2011 22:29:09 GMT</pubDate>
    <dc:creator>DominiqueBroux</dc:creator>
    <dc:date>2011-02-24T22:29:09Z</dc:date>
    <item>
      <title>Printing not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306701#M7916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to use silverlight printing to print a map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now it all works fine if you print a map which is visible in your silverlight application using standard silverlight printing methods.&amp;nbsp; The only problem is that I want my prints to fill the page I'm printing on and not be constrained by the screen size!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This article tells you how to do it, however if you introduce a map, it prints the control, but it never shows any map layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx"&gt;http://www.silverlightshow.net/items/Advanced-printing-in-Silverlight-4.aspx&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So basically I've created a user control which contains a map and some text blocks for header and footer information.&amp;nbsp; If I add the map to the layoutRoot on my silverlight application is displays fine (it fires the Progress event of the map cotrol).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However if I make an instance of the control and set this as the item I want to print, everything on the control prints including header for footer information I've created, but the map remains blank (although it fills the page which is what I wanted).&amp;nbsp; In fact it remains blank because it doesn't draw the layers as I can see the Progress event is never fired.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is going on here?&amp;nbsp; Is there anyway of printing a map control which isn't attached to the visible part of the silverlight applicaiton?&amp;nbsp; How can you force it to draw?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;WYSIWYG printing isn't very good in a map browser as the screen size isn't the same as the paper!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Help appreciated&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 12:08:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306701#M7916</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2011-02-24T12:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Printing not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306702#M7917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The issue is probably that a layer can't be included in many maps. So if you want at the same time the main map and a preview of the print, you need to clone the layers for previewing them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is done this way is this print sample: &lt;/SPAN&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=e361c2cc69784fcba34358d0458f66e3"&gt;http://www.arcgis.com/home/item.html?id=e361c2cc69784fcba34358d0458f66e3&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 13:48:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306702#M7917</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-02-24T13:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Printing not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306703#M7918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm creating all of the layers in my printMap control by phically adding them in again.&amp;nbsp; For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&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; //Bing Layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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; ESRI.ArcGIS.Client.Bing.TileLayer bingLayer = new ESRI.ArcGIS.Client.Bing.TileLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID = "BingLayer",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LayerStyle = ESRI.ArcGIS.Client.Bing.TileLayer.LayerType.Road,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Visible = true,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerType = ESRI.ArcGIS.Client.Bing.ServerType.Production,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Token = Application.Current.Resources["BingKey"].ToString()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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; };&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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; printMap.Layers.Add(bingLayer);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is if I display my control, like this I can print:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //create the printer view&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printerView = new PrinterView();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LayoutRoot.Children.Add(printerView);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once it has drawn, then you can call the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrintDocument printHandler = new PrintDocument();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printHandler.PrintPage += new EventHandler&amp;lt;PrintPageEventArgs&amp;gt;(printHandler_PrintPage);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printHandler.Print("Print Page");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But if I create the PrinterView and don't add it to LayoutRoot and send it to the Print methods you always get a blank map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need a way of forcing the Map control to redraw.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 16:04:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306703#M7918</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2011-02-24T16:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Printing not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306704#M7919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One option is you to create a popup (with an opacity set to 0.0 if you want it hidden), and put your printerView (or your main control containing the map) inside this popup.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 16:43:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306704#M7919</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-02-24T16:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Printing not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306705#M7920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well I've tried it and it kind of works.&amp;nbsp; Only problem is if you size the control to your paper (A4 for example) it is bigger than the dimensions of your screen.&amp;nbsp; If you print something bigger than your screen it gets cropped by the Silverlight print methods.&amp;nbsp; This why you don't have it connected to your GUI (as in the link in my first post).&amp;nbsp; WSYIWYG printing isn't what I want, I need to dimension my prints so they fill the paper.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I like a challenge!:D&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 18:18:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306705#M7920</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2011-02-24T18:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Printing not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306706#M7921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you try with a popup?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I remember, I think there is no limitation to the screen size with a popup.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And for sure the sample I pointed out is working when printing (with or without preview) to a printer bigger than the screen (A2, A1, A0).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 22:29:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306706#M7921</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-02-24T22:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Printing not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306707#M7922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Had a productive day once I'd discovered that once you land your grid that you want to print within a ScrollViewer the size restrictions go away...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've now got printing that fills the paper!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Feb 2011 13:44:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/printing-not-working/m-p/306707#M7922</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2011-02-25T13:44:59Z</dc:date>
    </item>
  </channel>
</rss>

