Select to view content in your preferred language

Download shown Map as PDF

2990
11
Jump to solution
04-19-2020 10:30 PM
rsharma
Frequent Contributor

Hi,

I want to download map with graphics on different graphics layer as pdf. Suggestions will be helpful, Thanx in advance.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Rajni,

 You can use the Print widget.

ArcGIS API for JavaScript Sandbox 

Or your ArcGIS Servers print service

YOUR ARCGIS SERVER/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task

This gives you the ability to export your map as a PDF.

View solution in original post

11 Replies
RobertScheitlin__GISP
MVP Emeritus

Rajni,

 You can use the Print widget.

ArcGIS API for JavaScript Sandbox 

Or your ArcGIS Servers print service

YOUR ARCGIS SERVER/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task

This gives you the ability to export your map as a PDF.

rsharma
Frequent Contributor

Sir from last 2 months i am using 4.14 version of esri and now suddenly 4.15 comes and this print task is in 4.15, Do i need to change my version now for libraries of downloading.

And do i need to purchase it YOUR ARCGIS SERVER/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task.

do this link below also do the same task as above one

Export a map | ArcGIS for Developers 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rajni,

   My recommendation is that while you are developing your code you should always use the most current API version. But there is no requirement for this unless there is some new feature or bug fix that you require from 4.15. The utility.arcgisonline.com url will be fine if you do not have your own ArcGIS Server.

rsharma
Frequent Contributor

Sir the map i downloaded from widget gives me map with my graphics, but it do not display markers i defined in my map.

This is what i found in browser params, I think it passes parameters of defined markers but do not show it on map.

plus i do not want to use this widget,

i just want to download pdf on button click so i   m trying through rest api then.

Is their any way to display markers also.

0 Kudos
tburus
by
New Contributor

Is it possible to use this solution if our map consists of displaying Feature Layers via URLs from ArcGIS Online rather than ArcGIS Server? 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rajni,

   You marker symbol url is invalid:

http://abc.com/wp-content/plugins/listing/public/images/High_signal.svg

Try using an esri image and it works fine:

      const textSymbol = {
        type: "picture-marker",
        url: "https://js.arcgis.com/3.28/esri/dijit/Search/images/search-pointer.png",
        width: "36px",
        height: "36px"
      };‍‍‍‍‍‍‍
rsharma
Frequent Contributor

Can't i use my own symbol as picture symbol

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rajni,

   So a developer would encounter an issue and then try and trouble shoot what it going wrong first. So The way I would see this is that my marker is not showing in the print, why? What would happen if I use another image in my PictureMarkerSymbol instead of my svg? What if I use an svg or image that is not local on my machine but public on some website? What if I use an esri image on their web servers? Which of those work? Why does one work and not the other. Is it an issue with accessing my svg locally?

rsharma
Frequent Contributor

Yes sir, you are right,

I m working on it, it may be due to https issue,

further i am working to write specifications for  the button on which i have to download map extracted its rings and point lat/long from the db.

0 Kudos