There is nothing wrong with your script. The problem is related to a bug I have just now found.
The scripting functionality is mainly developed while coding for PDF Explorer. Differences in the internal data holding structures, between PDF Explorer and PDF-ShellTools, totally disabled the setting of metadata from the PDF-ShellTools scripting functionality. It's working from PDF Explorer.
I have just fixed it, so it will be OK in the next release.
Meanwhile, you may use the
command line interface, or try your script from the
PDF Explorer my scripts functionality.
Thank you very much for reporting the problem.