Skip to main content
Participant
October 27, 2023
Question

Adding the same xmp file to several PDF.

  • October 27, 2023
  • 1 reply
  • 564 views

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.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
October 27, 2023

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