Server printing

3695
1
Jump to solution
05-06-2015 04:11 AM
Asgharkhan
Occasional Contributor

Hey Folks i am asking can we save server side map to image or PDF?

System.Windows.Browser.HtmlPage.Window.Navigate(e.PrintResult.Url, "_blank", "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,titlebar=no,");

how to modify this code for save result to local computer.....any idea?Dominique BrouxJennifer NeryAsser Swelam

0 Kudos
1 Solution

Accepted Solutions
JenniferNery
Esri Regular Contributor

Yes, you can use PrintParameters.Format to specify specify the file format. Your choices are available after making GetServiceInfo call: ArcGIS API for Silverlight API Reference| ArcGIS for Developers . PrintServiceInfo.Formats should give you the list of supported file format. SDK sample: ArcGIS API for Silverlight - Interactive Samples | ArcGIS for Developers

The PrintResult.Url gives you link to the file. You have several options to download data and save, you can look at any of these samples:

HttpClient: Downloading to a Local File in C# for Visual Studio 2010

WebClient.DownloadFile Method (String, String) (System.Net)

How to save file locally after downloading it with webclient?

silverlight - download file from absolute uri to stream to SaveFileDialog - Stack Overflow 

View solution in original post

1 Reply
JenniferNery
Esri Regular Contributor

Yes, you can use PrintParameters.Format to specify specify the file format. Your choices are available after making GetServiceInfo call: ArcGIS API for Silverlight API Reference| ArcGIS for Developers . PrintServiceInfo.Formats should give you the list of supported file format. SDK sample: ArcGIS API for Silverlight - Interactive Samples | ArcGIS for Developers

The PrintResult.Url gives you link to the file. You have several options to download data and save, you can look at any of these samples:

HttpClient: Downloading to a Local File in C# for Visual Studio 2010

WebClient.DownloadFile Method (String, String) (System.Net)

How to save file locally after downloading it with webclient?

silverlight - download file from absolute uri to stream to SaveFileDialog - Stack Overflow