Skip to main content
idjev
Known Participant
December 11, 2021
Question

How can I automate adding metadata to a PDF document?

  • December 11, 2021
  • 1 reply
  • 1879 views

Hi Good day,

There are thousands of pdf files, how can I automate adding metadata to these pdf documents?

File name  > adding it to the title and subject sections

Thanks....

 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
December 12, 2021

You can do it using the Action Wizard in Acrobat Pro.

Create a new Action and add to it an Execute JavaScript command with the following code:

 

this.info.Title = this.documentFileName.replace(/\.pdf$/i, "");

this.info.Subject = this.documentFileName.replace(/\.pdf$/i, "");

 

Make sure to un-tick the Prompt User box, and then add a Save command after this command, and run it on your files.

idjev
idjevAuthor
Known Participant
December 12, 2021

you are great,
thanks a lot