ArcPro Export Layout to PDF script

1040
1
03-20-2017 10:59 AM
RichardHughes2
Occasional Contributor III

I'm developing a solution to execute my layout export script through a Popen() specifying the ArcPro propy.bat and the script name.  The export script works in debug mode, the export script works when requested through a view on a local server.  However, when called through a view access through IIS as a wfastcgi application, the script fails silently at the ExportToPDF line.  I am unable to find any errors from the OS, python, or arcpy as to why the export fails, but the Popen exits, the child process terminates, and nothing is written to the output or error PIPES.  My first thought is folder permissions, but after opening up everything I can think of I am still stuck.  Any ideas as to why the export script would run, then fail silently at the exportToPDF step only when run through an IIS wfastcgi application under an application pool identity identical to my machine admin account?  

My tactic is to isolate the differences between the dev and the prod environments.  To this end I have moved to a 64 bit python install.  That did not solve the issue.

If the ExportToPDF line is not completing the export, how can I debug the arcobject method on the Layout object to see what it is returning?  When I step into the Export Method it returns the result of the ArcObject method but it does not step into the actual ArcObject method.

Any ideas, or will this just not work?  

0 Kudos
1 Reply
RichardHughes2
Occasional Contributor III

In the ArcPro Python window I have installed the Django package and migrated my other app packages to the ArcPro conda environment.  Now my print script is accessing the arcpy mp module directly rather than through a Popen().  The script runs fine on a local server, but when it is run through IIS nothing is output.  I am thinking that it is a permission issue after seeing an .exe file named AppEsriPrintLocal.exe in the ArcPro bin folder.  

Does anyone on the ArcPro team have any thoughts on whether I can use ArcPro to print layouts from a gdb on the web server?

0 Kudos