Copy link to clipboard
Copied
Good afternoon,
IĀ“d like to change the xmp file (Meta Data) for several pdf files at once.
I have a "ready".xmp but I donĀ“t know how to load or get it into Acrobat (respectively the pdf files) as thereĀ“s no option for that (possibly aside Java Script which I am unfortunately not firm with).
Hence my question, does somebody know how I can batch process 1 .xmp file for several .pdfĀ“s at once with the Acrobat DC Action Wizard?
Thank you in advance for you help
KR Phillip
Copy link to clipboard
Copied
No, that's right.
Copy link to clipboard
Copied
Hi KR Philip
Hope you are doing well and sorry for the trouble.
The workflow that you are trying to achieve is possible using the Javascript. You may check out the similar discussion https://acrobatusers.com/forum/javascript/how-import-xmp-file-pdf/ and see if that works for you.
Regards
Amal
Amal
Copy link to clipboard
Copied
That thread is missing the easiest solution, in case that the XMP file used for all the PDFs is the same.
In that case, the easiest way to do it is to hard-code the XMP contents into the script.
You just need to convert it to a string, and then use the following code:
this.metadata = "XMP string goes here";
Copy link to clipboard
Copied
Hi try67,
thank you for your help.
Unfortunately my programming skills are quite limited and for Javascript not-existing at all, could you explain to me how I convert the XMP to a string (I donĀ“t assume itĀ“s not just removing the line breaks from the entire XMP file?). I made a "dummy" XMP but this is already quite long, hence my question.
And for "this.metadata = "XMP string goes here";" I'd simply have to insert that code snippet into the Ā“Execute JavascriptĀ“ in the Action Wizard?
Thank you.
Phillip
Copy link to clipboard
Copied
- Yes, just copy the entire contents of the XMP file, removing all line breaks, and escaping all instances of " and \ by adding another "\" before them.
- That's correct.
Copy link to clipboard
Copied
Thanks for your prompt reply.
May I ask you what you mean by "escaping" all instances of | \ | and | " |
I removed all line-breaks, but couldnĀ“t find any "\", however there are lots of " for instance
<rdf:Description rdf:about=""
xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/"
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
By adding another "\" before them it would look like this:
<rdf:Description rdf:about=\"\"
xmlns:xmpRights=\"http://ns.adobe.com/xap/1.0/rights/\"
xmlns:photoshop=\"http://ns.adobe.com/photoshop/1.0/\"
I believe I got this wrong, didnĀ“t I?
Copy link to clipboard
Copied
No, that's right.
Copy link to clipboard
Copied
Although I have no clue what I actually did, with your guidance I really have managed to do it.
It works, thank you very much for all your help!
Copy link to clipboard
Copied
Hi Amal,
thank you for your help. I already found the post you mentioned by myself unfortunately I do not understand Java and couldnĀ“t really follow the discussion for that reason.
Thank you.

