PDF-ShellTools > General

Script doesn't set metadata


I'm testing the program right now and cannot figure out how to set metadata by script.

I reduced the sample script provided to the maximum. Also according to th API documentaion ist seems correct, but the metadata stays unchanged. What am I missing?

My Script:

  for (var i = 0; i < pdfe.Arguments.Count(); i++) {
              var Filename = pdfe.Arguments(i);
              var FileMetadata = pdfe.SelectedFiles(i).Metadata;
              if (FileMetadata.CommitChanges()) {
                    pdfe.echo(Filename + ' - OK');}

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.


[0] Message Index


Go to full version