print widget very slow

5786
14
01-15-2014 04:45 AM
EricGardecki
Occasional Contributor
I'm finding that the OOTB print widget takes too long to generate the print.  A letter-sized takes around 10 seconds and a tabloid-sized takes 20-25 seconds.  When I create my own template, which has more map area on the print, it takes about 35 seconds for a tabloid-size.  10 seconds seems acceptable but anything more and it seems like there's something wrong from the end-user standpoint.

I've been unable to find what might cause it to be so slow.  Is everyone seeing their prints take this long?  If not, what factors might be causing such a thing on my end?

thanks
Tags (2)
0 Kudos
14 Replies
BrianOevermann
Occasional Contributor III
Something is definitely amiss.  I am currently using v3.4 on Server 10.1 with my own Export Web Map Task and have it set to 300 dpi.  Letter sized pdfs process in a few seconds.  An Arch E size plot set to print at 1200 scale takes about a minute to a minute and a half, but that is a lot of data to process for such a large paper size.

I'm currently rolling my viewers up to v3.6 and my Letter sized pdfs are taking around a minute.  The Arch E size plots are well beyond 5 minutes.  I'm not sure how long exactly because that's the limit of my patience for testing and certainly not acceptable for my users.

So something changed between API 3.4 and 3.6 because I haven't done anything to the Export Web Map Task or any of my cached or dynamic basemap services.
0 Kudos
SebastienPelletier
Occasional Contributor

Hello I know the discussion is old but I have the same problems with Web app Builder  and ArcGIS Server 10.2.1. Did you find a solution?

0 Kudos
by Anonymous User
Not applicable

I never did - gave up on printing. Now using the ArcGIS JavaScript API and for printing I am starting to work on a 'print' CSS media query that sets-up the page nicely to go to print

0 Kudos
JackFairfield
Occasional Contributor II

One thing you can try to improve printing time is to optimize your Json that is passed to the service.  You can access this Json right before it is used in the print task like this:

esriRequest.setRequestPreCallback(myCallbackFunction);

function myCallbackFunction(arguments) {

     //Check for an execute request

     if (arguments.url.indexOf("execute") > -1) {

          //Get the text that would be sent to the service

          var txtJson = arguments.content.Web_Map_as_JSON;

          //Parse the JSON to make it easier to change

          var tempObj = JSON.parse(txtJson);

          // Make your changes / Optimizations here

          // For example  "tempObj.operationalLayers[1].featureCollection.layers[0].layerDefinition.name = "Test";"

          // Convert back to Json

          arguments.content.Web_Map_as_JSON = JSON.stringify(tempObj);

          return arguments;

     }

     else {

          return arguments;

     }
}

I would also recommend optimizing your out fields in all feature layers.  If you aren't using the field in the renderer, you probably don't need to send it to the print service.

0 Kudos
GarrettSeay2
New Contributor II

I've found these setting have greatly increased my print speed with the widget.

Basically making it a format of PNG8, with a px width/height of standard letter paper and a DPI of 72 at the maps extent.

0 Kudos