You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have been running pdfjinja and have ran into an interesting issue. When calling our python code directly from the command line everything works. However when our code is started by another calling process, in this case ArcGIS Server, it fails on the call to Popen.
If we hard code our path to pdftk into pdfjinja like so, it works.
I believe it has something to do with the following Python bug, and isn't directly an issue with pdfjinja. https://bugs.python.org/issue8557
Root cause seems to be that Popen isn't respecting anything on the System PATH variable in Windows.
However, perhaps there is a way around it in pdfjinja? Like perhaps passing down the current env into the process being opened. The issue is a bit of a maintainability nightmare for us.
We have been running pdfjinja and have ran into an interesting issue. When calling our python code directly from the command line everything works. However when our code is started by another calling process, in this case ArcGIS Server, it fails on the call to Popen.
If we hard code our path to pdftk into pdfjinja like so, it works.
args = [
r"C:\Windows\SysWOW64\PDFtk Server\bin\pdftk.exe",
self.filename,
"fill_form", "-",
"output", "-",
"dont_ask",
"flatten"
]
I believe it has something to do with the following Python bug, and isn't directly an issue with pdfjinja.
https://bugs.python.org/issue8557
Root cause seems to be that Popen isn't respecting anything on the System PATH variable in Windows.
However, perhaps there is a way around it in pdfjinja? Like perhaps passing down the current env into the process being opened. The issue is a bit of a maintainability nightmare for us.
Additionally, I've found a very similar issue that may be helpful.
https://gis.stackexchange.com/questions/234664/how-to-set-up-geoprocessing-service-to-fill-out-pdf-form-from-within-web-appbuil
The text was updated successfully, but these errors were encountered: