Troubleshooting web service printing failures

The first steps to take in diagnosing a web service printing failure are to consider what print service you are using and the location of the layers you are printing.  

1. What print service are you using?

If you are working with your own in house print service and it is failing, first check that the print service is running. The out-of-the-box PrintingTools service is stopped by default so start it from ArcCatalog or Server Manager before trying to use it.  

Once started, navigate to a URL similar to the one below. You may need to adjust these examples if you are not using localhost or going over the web adaptor or using a custom print service:

http://localhost:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task/execute

Enter the following JSON in the 'Web Map as JSON' box:

{"exportOptions":{"outputSize":[1258,716],"dpi":96},"layoutOptions":{"legendOptions":{"operationalLayers":[]}},"mapOptions":{"extent":{"spatialReference":{"wkt":"PROJCS[\"WGS_1984_Web_Mercator_Auxiliary_Sphere\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Mercator_Auxiliary_Sphere\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",47.812499999987615],PARAMETER[\"Standard_Parallel_1\",0.0],PARAMETER[\"Auxiliary_Sphere_Type\",0.0],UNIT[\"Meter\",1.0]]"},"xmax":24616392.08517806,"ymin":-10919517.704530645,"xmin":-24616392.08517806,"ymax":17101685.36858142}},"operationalLayers":[{"minScale":591657527.591555,"title":"World Street Map","url":"<substitute in ArcGIS Server map service URL>","id":"Printing Test","maxScale":1128.497176}]}

You will need to substitute your ArcGIS Server map service URL into the JSON above. This can be either an external or internal map service.

To test using an external map service substitute in a URL similar to the one below.

http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer

To test using an internal map service substitute in a URL similar to the one below. You may need to adjust this example if you are not using localhost, going over the web adaptor or have deleted the SampleWorldCities service. If your service is secured, make sure you have logged in to the REST Services Directory first and you can see the service in the services list. 

http://localhost:6080/arcgis/rest/services/SampleWorldCities/MapServer

Leave all other boxes blank then click on ‘Execute Task (GET)’. This should generate a PDF document in your configuration store which is usually located here:

C:\arcgisserver\directories\arcgisoutput\Utilities\PrintingTools_GPServer

If it does not generate a PDF document then an error might be returned in your browser or you could check your ArcGIS Server logs through ArcGIS Server Manager.

If you find problems with your custom print service try testing against the out-of-the-box print service instead.

2. Where are your layers located?

If you are trying to print external service layers, it might be that the ArcGIS Server Windows user account does not have internet access. The easiest way to test this is to browse to your Internet Explorer icon and press Windows Shift + Right click and this brings up the option to ‘Run as different user’:

printing.png

Select this and run as the domain or local user the ArcGIS Server windows service is running as and try and connect to the URLs the print service is trying to connect to. If the connection fails, run through the steps in this help document which forces the account through your proxy. If the user can successfully connect to the internet, try printing again.

The ArcGIS Server log files might also suggest a connection issue. For example:

Layer "World_Street_Map_417": Unable to connect to map server at http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer