Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
0

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

New Here ,
Dec 09, 2021 Dec 09, 2021

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

TOPICS
Create PDFs , Edit and convert PDFs , How to , JavaScript
960
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Dec 11, 2021 Dec 11, 2021

No, that's right.

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 10, 2021 Dec 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

Regards
Amal
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 10, 2021 Dec 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";

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 11, 2021 Dec 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 11, 2021 Dec 11, 2021

- 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 11, 2021 Dec 11, 2021

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?

 

 

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 11, 2021 Dec 11, 2021

No, that's right.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 11, 2021 Dec 11, 2021
LATEST

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 11, 2021 Dec 11, 2021

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.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines