The user that submitted the file is granted change access to it.
The destination folder is setup so that nobody except the service account has change access to files created in that directory.
Everyone else only List Folder Contents.
Essentially anyone can generate PDF even with confidential information without worrying about anyone being able to view the file.
If for some reason the script failed to grant the user access (which has never happened), nobody would have access. So again no confidential information at risk.
I wrote this about 4 years ago and it has been running ever since without issue. It is being used by a user base of about 600 users.
I don't have enough room to upload everything you need but I have uploaded a zip file with the code and critical files.
I have provided links to the remaining files you'll need below.
Enjoy!
Download Adobe Postscript Driver
Download GhostScript 8.60





