ArcGIS API for JavaScript: ExportWebMap_LinkGIS (MapServer)
Built using the ArcGIS API for JavaScript