Print service very slow with custom layouts

5761
14
Jump to solution
01-28-2015 11:08 AM
BrandonNelson1
New Contributor III

I am writing a webapp for my organization that needs to support printing through our local ArcGIS Server 10.1 instance.  As long as I publish the service with Layout Templates Folder blank (to use the default templates) I have no problems, but if I give it the folder with our branded layout templates, the only "layout" I can use is MAP_ONLY – everything else times out, and no error is logged in the server.  I've tried this using both the Print widget and PrintTask, with no success.

Edit:  With Kelly Hutchins‌' help, I discovered that the print was eventually successful, but took too long to be recognized by the JS API.  Is there anything I can check/change with our template documents to bring the processing time down to reasonable levels?

0 Kudos
1 Solution

Accepted Solutions
TanuHoque
Esri Regular Contributor

I tried the JSON posted by Kelly with my printing service and my templates. I got the output in couple of secs.

Brandon, do you have any layers in your template mxd? Did you try recreating the template from scratch?

can you share your template with me? i can take a look.

Thanks.

View solution in original post

14 Replies
KellyHutchins
Esri Frequent Contributor

Is your print service public? If so can you paste the url so we can take a look?

0 Kudos
BrandonNelson1
New Contributor III

The service I'm trying to use is not, but I've set up another on our external server with the same configuration:  http://gis.palmbayflorida.org/arcgis/rest/services/jsbeta/Print/GPServer/Export%20Web%20Map

We're currently using version 10.1 Advanced, but I believe there are plans to upgrade to 10.2 in the near(?) future.

0 Kudos
KellyHutchins
Esri Frequent Contributor

I ran a few tests and can reproduce the problem at the service directory so perhaps this is an issue with the service?  Might be best to submit an issue to support so they can work through this with you and troubleshoot your service setup.

Here's the test I used to repro

1. Navigate to the service directory

Execute Task (Export Web Map)

2. Enter the following in the Web Map as JSON field

{"mapOptions":{"showAttribution":true,"extent":{"xmin":-13074899.231001616,"ymin":4015941.6611683434,"xmax":-13073257.02922219,"ymax":4016397.894680882,"spatialReference":{"wkid":102100,"latestWkid":3857}},"spatialReference":{"wkid":102100,"latestWkid":3857},"scale":4513.988704998488},"operationalLayers":[{"id":"layer0","title":"layer0","opacity":1,"minScale":591657527.591555,"maxScale":1128.497176,"url":"http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},{"id":"layer1","title":"layer1","opacity":1,"minScale":591657527.591555,"maxScale":1128.497176,"url":"http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServe..."},{"id":"graphicsLayer2","title":"graphicsLayer2","opacity":1,"minScale":0,"maxScale":0,"layerDefinition":{"drawingInfo":{"renderer":{"type":"simple","label":"","description":"","symbol":{"color":[255,255,0,255],"outline":{"color":[255,255,0,255],"width":2,"type":"esriSLS","style":"esriSLSSolid"},"type":"esriSFS","style":"esriSFSBackwardDiagonal"}}}},"url":"http://sampleserver6.arcgisonline.com/arcgis/rest/services/PoolPermits/MapServer/1"},{"id":"map_graphics","opacity":1,"minScale":0,"maxScale":0,"featureCollection":{"layers":[]}}],"exportOptions":{"outputSize":[800,1100],"dpi":96},"layoutOptions":{"titleText":"Pool Permits","authorText":"Made by:  Esri's JS API Team","copyrightText":"<copyright info here>","scaleBarOptions":{"metricUnit":"esriKilometers","metricLabel":"km","nonMetricUnit":"esriMiles","nonMetricLabel":"mi"},"legendOptions":{"operationalLayers":[]}}}

3. Enter a valid format (PDF, PNG32, PNG8, JPG, GIF, EPS, SVG, SVGZ)

4. Enter MAP_ONLY in the layout template then hit 'Execute Task (Post)' and not that it works. Try again after changing the layout template to   Mono8X11Land_Info and note that it times out eventually.

BrandonNelson1
New Contributor III

In fact, following your steps I did get a successful run with Mono8X11Land_Info._ags_f3d492176c2d43369b3df5bb981fcd9e.png

However, it took several minutes -- I assume that's why PrintTask is timing out -- whereas using the default templates I get results in 5-10 seconds.  I have noticed our template MXD is about 7MB (the city logo and compass rose are embedded images), compared to 400kB for the default templates, but I wouldn't expect that alone to affect the processing time by such a large factor.  Could there be something in the document itself that's a problem?

0 Kudos
KellyHutchins
Esri Frequent Contributor

Brandon,

I'm not sure what could be causing the print service with custom layout to take such a long time. Perhaps post this question to the ArcGIS for Server‌ place?

Kelly

BrandonNelson1
New Contributor III

I'll try that.  Thanks for your time.

0 Kudos
GabiVoicu
Occasional Contributor

I'm also trying to use the print service within our custom Javascript API web mapping app within our server and I believe I have seen it working on Friday last week (with witnesses and all ) but yesterday I could not get it to print again and it's been quite a challenge to figure out how to debug this one !

If anyone would, could PLEASE take a look at out maps

http://gismaps.collincountytx.gov/main103.html

THANK YOU

0 Kudos
BrandonNelson1
New Contributor III

Is this for an internal or external app?  The first problem I notice is that it tries to load several layers from what looks to be an internal server, and using Kelly's advice to execute the print service directly, I got the error "Unable to connect to map server at http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer."

GabiVoicu
Occasional Contributor

Our websense was blocking access - no more though !

Thank you Tanu

0 Kudos