PDF Editing Issues

Batch Apply XMP Metadata to PDFs in Adobe Acrobat Action Wizard

Nimra MalikNimra Malik Nov 18, 2026 869 views

Question details

Apply the same external XMP metadata to multiple PDF files in a batch.

Batch Apply XMP Metadata to PDFs in Adobe Acrobat
Product
Adobe Acrobat Pro
Device & OS
not provided
Scenario
Use Acrobat JavaScript and Action Wizard to apply one XMP metadata packet to a collection of PDFs.
Observed behavior
Each processed PDF should contain the intended XMP metadata after the action saves it.
Before you start

Make sure Acrobat Pro has Action Wizard available and that you have a valid XMP file. Check the metadata for document-specific identifiers or properties that should not be copied to every PDF.

Solution 1Recommended

Run an Acrobat JavaScript action on the PDF batch

Use this workflow when the same XMP packet should be assigned to each PDF and saved through an Acrobat action.

Acrobat does not provide a simple Action Wizard command for importing an external XMP file into every PDF. Instead, place the XMP content in a JavaScript string and assign it to each document's metadata property.

Replacing the metadata packet can overwrite existing document-level XMP. Test the action on a small set of files first and inspect the results.

1
Prepare the XMP string

Open the XMP file in a text editor and convert its contents into a valid JavaScript string literal. Escape quotation marks, backslashes, and line breaks as needed; do not alter the XML content itself.

2
Create an action

In Acrobat Pro, open Tools > Action Wizard, select New Action, and add Execute JavaScript from the available tools.

3
Add the metadata script

Open Specify Settings for Execute JavaScript and enter `this.metadata = "PASTE_ESCAPED_XMP_HERE";`, replacing the placeholder with the escaped XMP content. Keep the surrounding JavaScript quotation marks.

4
Configure and run the batch

Add a Save step to the action, choose the desired save settings, and save the action. Run it from Action Wizard and select the PDF files or folder to process.

5
Verify the results

Open a processed PDF and choose File > Properties > Additional Metadata to check the metadata. Repeat the check on another file before processing the full batch.

Run an Acrobat JavaScript action on the PDF batch
Check action and file restrictions: Menu names can vary by Acrobat version. Restricted PDFs or scripts that require privileged file access may need additional permissions; embedding the XMP string avoids having the action read an external file for each PDF.
Free Microsoft Office alternative

Work with PDFs and Office files in WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface and support for common Office formats, making it easy to move between documents and PDFs. Acrobat is still needed for the Action Wizard JavaScript workflow described above.

Open and work with PDFs alongside other documentsCompatible with Microsoft Word, Excel, and PowerPoint formatsFamiliar interface for a straightforward transition from Microsoft OfficeFree, lightweight option for everyday document work
microsoft office alternative - wps office

Frequently Asked Questions

Can Action Wizard import an XMP file directly into multiple PDFs?

Acrobat does not offer a simple Action Wizard command for that batch import. Add Execute JavaScript to an action and assign the prepared XMP string to each document's metadata instead.

How do I check whether the metadata was applied?

Open a processed PDF in Acrobat and choose File > Properties > Additional Metadata. Inspect the relevant fields and check more than one processed file.

Will this method preserve each PDF's existing XMP metadata?

Not necessarily. Assigning a complete XMP packet can replace existing document-level metadata, so review the packet and test on a small set before running the full batch.

Do pipe characters always need escaping in the XMP string?

No. A pipe character does not normally need escaping in a JavaScript string. Escape characters required by the string syntax, such as quotation marks and backslashes, and check any additional requirements of your particular workflow.