Skip to main content
Participant
December 9, 2021
Answered

how to batch load an xmp file with the Acrobat Action Wizard

  • December 9, 2021
  • 1 reply
  • 1392 views

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

This topic has been closed for replies.
Correct answer try67

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?

 

 

 

 


No, that's right.

1 reply

Amal.
Legend
December 10, 2021

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

try67
Community Expert
Community Expert
December 10, 2021

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";

Participant
December 11, 2021

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