Select to view content in your preferred language

Print map using Server print Service

156
3
a week ago
FrancescoGiovinazzo
Regular Contributor

Hello,

I am trying to find a tutorial or a sample about printing using Runtime for .Net, I have found the old WPF samples with the PrintTask but I cannot find anything similar for the new SDK.

I would prefer not to have to manually create the map json (Map.ToJson() does not fill all the print required json elements) and to manually call a geoprocessing task so, am I missing something or printing using the print service is not yet part of this SDK?

0 Kudos
3 Replies
PreetiMaske
Esri Regular Contributor

Current ArcGIS Maps SDK for Native apps does not have a PrintTask. However you can export the map contents as an image via this API call. 
https://developers.arcgis.com/net/api-reference/api/net/Maui/Esri.ArcGISRuntime.Maui.GeoView.ExportI....

0 Kudos
FrancescoGiovinazzo
Regular Contributor

Thank you for your answer, I have found that API call, but I need to print pdf using the templates configured on the server, I guess this will be more painful than expected then 😞

0 Kudos
FrancescoGiovinazzo
Regular Contributor

Just to give an update, I have tried using the Map.ToJson() method, adding mapOptions and exportOptions json nodes following ESRI specification, then using a generic GeoprocessingTask to call the print service, things works but the JSON is nowhere near correct, it messes up all the visibility and the pdf returned have also layers that are not being shown in the map

0 Kudos