Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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 ... ";