Download shown Map as PDF

165
10
Jump to solution
04-19-2020 10:30 PM
Highlighted
Occasional Contributor II

Hi,

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

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
MVP Esteemed Contributor

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

10 Replies
Highlighted
MVP Esteemed Contributor

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

Highlighted
Occasional Contributor II

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 

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

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.

Highlighted
Occasional Contributor II

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.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

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"
};‍‍‍‍‍‍‍
Highlighted
Occasional Contributor II

Can't i use my own symbol as picture symbol

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

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?

Highlighted
Occasional Contributor II

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.

Reply
0 Kudos
Highlighted
Occasional Contributor II

Hi

I am still not able to download the map on button click. Got this link also. Can you please help me in any way.

Take a screenshot of a SceneView | ArcGIS API for JavaScript 4.15 

Reply
0 Kudos