Printing with Silverlight 5 and API 2.4

3046
5
03-15-2012 05:15 AM
LuisCÃ_spedes
New Contributor
I was using SL 4 and api 2.1 with DB's Printing Sample. It worked great, but now I updated to SL 5 with api 2.4 and everything gets jammed together when printed. Everything looks fine in the preview child window, but when sent to the printer, it does not keep its format. Did something change? I know that SL5 uses vectors and bitmap, is there sample code to show how to treat these two with the new stuff?

Also, the "onDemand" layers are not coming up on the printed map or the preview map. Can onDemand layers be printed?

Thanks all
0 Kudos
5 Replies
DominiqueBroux
Esri Frequent Contributor
I attached a version working with SL5 and ArcGIS SL 2.4.

I also adpated the sample to work with OnDemand Feature layers. The previous verison was not working very well with this kind of layers since the graphics was cloned at the moment the print dialog was opened.
You can test a OnDemand feature layer with the live application by printing at a scale denominator smaller than 500000 (density by cities).

Hope this helps.
0 Kudos
JobyGeorge
New Contributor
Hi BROUX,

Is it possible to print Map in A3, A2 ,A1 etc. I tried the sample 'Client side Map Printing to scale over multi pages' its working fine for A4 paper
From where can i find the latest sample for printing in silverlight 4 api version 2.2.

Regards
balu
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Is it possible to print Map in A3, A2 ,A1 etc. I tried the sample 'Client side Map Printing to scale over multi pages' its working fine for A4 paper


Sure. When printing and selecting the printer, use the 'Preferences' dialog to change the printer parameters : Orientation, Paper size.....
The print will use these parameters that will become the default for the print preview dialog.

From where can i find the latest sample for printing in silverlight 4 api version 2.2.


Latest sources for SL4 are here : http://www.arcgis.com/home/item.html?id=e361c2cc69784fcba34358d0458f66e3

The version adapted for SL5 is given in this thread (second post).
0 Kudos
JobyGeorge
New Contributor
Sure. When printing and selecting the printer, use the 'Preferences' dialog to change the printer parameters : Orientation, Paper size.....
The print will use these parameters that will become the default for the print preview dialog.



Latest sources for SL4 are here : http://www.arcgis.com/home/item.html?id=e361c2cc69784fcba34358d0458f66e3

The version adapted for SL5 is given in this thread (second post).


Thanks a lot Dominique 🙂
0 Kudos
balureghunathan
New Contributor
Sure. When printing and selecting the printer, use the 'Preferences' dialog to change the printer parameters : Orientation, Paper size.....
The print will use these parameters that will become the default for the print preview dialog.



Latest sources for SL4 are here : http://www.arcgis.com/home/item.html?id=e361c2cc69784fcba34358d0458f66e3

The version adapted for SL5 is given in this thread (second post).


Hi,

I am using the silverlight 4 version for printing the map and the  base map used is dynamic map service.
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/M...
this is the sample map which i used.
While printing A4 and A5 it is working fine. But when i tried A3, A2 etc it is throwing error. The exception is {System.Exception: Unknown printing error.}.

I am also getting same issues when i am trying to print a dynamic map which contains large number of layers. When i try to print a dynamic map with large number of layer it(A4) works fine for 3 -4 times, then it stops working.

How can i fix these issue. Any suggustion will be really helpful.

Regards,
Balu
0 Kudos