What I want to do seems pretty basic: Export a map series layout (or even a single page layout) in Portal using a gp service created in Pro (i.e. Share As > Web Tool) using the original data sources.
Since I can't use network file shares as a data store (security issue I am told), I simply let it copy the aprx to the server. This exports the current state of the feature service data in the map to a file gdb and copies it up. Whenever I run the tool, it obviously uses the local file gdb.
First of all, would this even respect the original data sources if I had access to network file shares?
My partial workaround is to replace that aprx with my original aprx that has the connections to the feature services. Works fine... if I set the permissions of the feature service to Everyone.
Otherwise it still exports the pdf only with no data. Interestingly I get no errors (even at debug level) and it still pulls the legend fine.
I have looked into editing the manifest.json but no idea of the syntax… possible to change credentials? Somehow create a token and pass it?
I know you can rename the msd file to zip to see the contents… I see nothing helpful.
Setting the aprx to CURRENT results in an error after publishing.
Hopefully I am making this more complicated than it is. Any insight or suggestions are appreciated!
import sys, os, arcpy outFile = arcpy.GetParameterAsText(0) aprx= r"C:\projects\prettymaps.aprx" layout = aprx.listLayouts("Layout")[0] layout.exportToPDF(outFile)
There's functionality to reference a Print service within a print widget in Portal.
Print widget—Portal for ArcGIS | Documentation for ArcGIS Enterprise
Configure your own custom template to be consumed as a print service:
Problem is you can't use a map series with that and I am modifying other elements on the layout. It seems to be working now... I added the arcpy.SignInToPortal function and it now pulls in the layers. I'm sure I'll run into more problems.
Hey! Do you have any updates on this, Aaron? Did any other issues come up for you?