[GIS] ESRI JS API – Getting a Screenshot with pure Javascript

arcgis-javascript-apijavascript

I have a requirement to be able to produce a pdf of the application's map (Esri JS API 3.7). The map will contain ArcGISDynamicMapServiceLayers, user drawn graphics including text symbols, and possibly a pop-up.

The PrintTask made available at ArcGIS Server 10.1 gets be about 80% of the way there. However, it does not handle text symbols or popups as far as I can tell. If it were just the text symbols I had to worry about, I think I would just hack together something with the arcpy mapping module to do the job. But the popup is much more challenging

I've explored things like BrowserShots, wkhtmltoimage…etc and like with no luck. I'm wondering if anyone has been able to accomplish something similar.

Best Answer

You can do a lot with arcpy. You should be able to handle text symbols (labels). Check out some of the advanced printing tutorials. Something like a popup might be challenging. I don't think a screen shot approach could work because you never know the screen resolution of client device and how that might fit into whatever fixed size you are trying to I use. Printing maps has always been a pain point, but for what it's worth, arcpy offers options, the learning curve is just steep.