Select to view content in your preferred language

Print Task Questions

815
2
Jump to solution
07-11-2012 01:29 PM
AlanRussian
New Contributor III
Hello,

I'm using the Print Task to add printing capabilities to my JS API site, and I had a couple questions:


  1. Is it possible to set the extent of the print?

  2. Is it possible to control which graphics layers are sent to the print task?

Using Tom's fantastic Advanced Print Solution, I set up my site to create a box on top of the map that could be resized.  I set it up to print to the extent of the box and without the box graphic displaying.  However, with the release of Arc 10.1, I'd like to utilize the Export Web Map Task while keeping the site intact.  The print task just prints to the map's current extent with everything that's visible, and I didn't see how I could change this while reading the documentation.

I appreciate the help.

--Alan
0 Kudos
1 Solution

Accepted Solutions
JianHuang
Occasional Contributor III
Alan,

Print service essentially is a GP service. If the JavaScript PrintTask doesn't meet your needs, just use the print service as a regular GP service by sending all the required parameters.
Here is the do of using print service as a GP service directly.
http://resources.arcgis.com/en/help/rest/apiref/gp_exportwebmaptask.html
But it might not be easy to construct a webMapJson. So I suggest to utilize the printTask to generate the json by calling printTask._getPrintDefinition(map). It retuns an the webmapJson object. Then, you can modify it before sending it to the print GP service.
Hope this helps.

View solution in original post

0 Kudos
2 Replies
JianHuang
Occasional Contributor III
Alan,

Print service essentially is a GP service. If the JavaScript PrintTask doesn't meet your needs, just use the print service as a regular GP service by sending all the required parameters.
Here is the do of using print service as a GP service directly.
http://resources.arcgis.com/en/help/rest/apiref/gp_exportwebmaptask.html
But it might not be easy to construct a webMapJson. So I suggest to utilize the printTask to generate the json by calling printTask._getPrintDefinition(map). It retuns an the webmapJson object. Then, you can modify it before sending it to the print GP service.
Hope this helps.
0 Kudos
AlanRussian
New Contributor III
That will work perfectly.

Thanks so much!
0 Kudos