Script to save Devonthink tags to disk as pdf metadata

Does such a script exist: it would save tags created in Devonthink as metadata for the corresponding pdf files on disk ?
If it doesn’t, how difficult is it to create one in Applescript, for example by modifying the script Convert keywords to tags, which does the reverse operation.

Just to add that I am not referring to Openmeta data but to Adobe metadata for pdf files.

No, and writing XMP by any means is unpleasant. You might want to check out Phil Harvey’s EXIFTool. It may be able to do what you want.

Another approach is to script Skim to do the work for you. Skim’s AppleScript library is extensive, and includes reading/writing PDF keywords. An excellent model for cleverly using AppleScript to integrate DEVONthink and Skim is the work of John Sidiropoulos at A Digital Workflow for Academic Research.

And yet I didn’t find a way to set pdf keywords in Skim itself. One can display metadata for a pdf (Command-I) but it is not editable.

PDF software is wildly inconsistent.