Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Adding the same xmp file to several PDF.

New Here ,
Oct 27, 2023 Oct 27, 2023

Hello. I'm sorry if this question has been answered elsewhere, but I haven't been able to find it. I'm looking for a solution to automate the attachment of XMP metadata to multiple PDF files, resulting in PDF/A format files. The steps I'm currently following are: open the PDF, go to properties, additional metadata, advanced, replace, select the XMP file, OK, and close the file. When I reopen it, I have a PDF/A file with the included metadata. The issue is that if I have to attach the same metadata to 30 PDF files, it takes a lot of time, and I believe there must be a solution for this. Can someone help me? Regards, thank you very much.

TOPICS
Edit and convert PDFs , PDF
462
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 ,
Oct 27, 2023 Oct 27, 2023
LATEST

You can replace a file's full metadata using a script, which in turn can be used in an Action to process multiple files.

However, you will need to convert the XMP data to a valid string first, which can be tricky, as you would need to escape all quotes, back-slashes, line-breaks, etc.

 

The basic code to do it is the following:

 

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