Best Practices for Configuring Custom print service

1481
1
03-26-2021 09:58 AM

Best Practices for Configuring Custom print service

Configure mxd's:

change scale to include adjusting for divisions and division values, set images to be included with the document, include dynamic titles, enable text wrapping and another legend layout setting.

 

run the export web map tool, get layout templates tool.

 

register a directory to arcgis server (ags) so that ags can reference the mxd's, rather than copy it over to the server.

If required, get the arcgis server account domain user access to that shared drive/directory.

To get more details about the arcgis server account domain user, run this in powershell within an asset/machine in the same domain as the ags account domain user:

Import-Module ActiveDirectory
$x = '<agsaccountdomainuser>'
Get-ADUser -Filter "SamAccountName -like '*$x*'

Now arcgis server references any updates to existing mxds, and will reflect that on the printed document from an arcgis web app.

You will only need to republish the print service if a new mxd layout is added to the directory arcgis server references, and the other scenarios mentioned in the Esri documentation.

The mxd's in the directory are the authoritative documents for this print service.

 

 

Publish the export web map result from the gp results, and add get layouts template, as per the Esri documentation.

 

Now configure the print service, including the "export web map" endpoint in a ArcGIS web app.

 

reference:

https://enterprise.arcgis.com/en/server/10.6/create-web-apps/windows/tutorial-publishing-additional-...

 

 

 

 

In case you need to print secured arcgis services with the print service:

Add ags account domain user to the portal as a viewer and add to any group in which desired layers to print are part of.

if you get this issue:

"An email address is required for adding an enterprise user. The user <agsaccountdomainuser> does not have an email address set, and cannot be added."

Instead add with ArcGIS API for Python or admin endpoint:
https://portal.domain.com/webadaptor/portaladmin/security/users/createUser  

preferably use a monitored email.

 

 

The print service should have access to any layer you desire to print. 

If the layer is secured (such as with portal federation or other way), this is accomplished by adding the ags service account domain user to the same portal groups the desired layers are shared to.

More on this here:

https://community.esri.com/t5/arcgis-enterprise-portal/print-secure-services-using-web-tier-authentication/m-p/451360/highlight/true#M6223  

 

Note, that in some implementations, we cannot cross dev, qa, prod environments, since firewall access is not available amongst them, and printing will fail from web apps that reference service urls from mixed environments.

The print service handles all requests/tasks server-side, so fails.

The reason the a dev portal might allow qa/prod service urls to be uploaded to the web map is because those uploads are done client-side, and then the urls are stored as a configuration in the portal.

Version history
Last update:
‎03-26-2021 09:58 AM
Updated by: