Skip to main content
New Participant
November 4, 2020
Question

Replacing placeholder text in PDF headers with Filename

  • November 4, 2020
  • 1 reply
  • 832 views

I have 1000's of PDF that all need to have their headers added and modified to show the following:

 

"Filename" / "Page Number" 

 

Thus far I have managed to use the Action Wizard in Acrobat DC to get all the headers in the PDF's to show:

 

xx (Placeholder text) / 1 (using the page number function in headers & footers)

 

Is there a way to replace the "xx" (placeholder text) with the PDF filename (excl. the ".pdf") in the header using JavaScript? And can this be done in a way to automate it for all the PDF's selected?

This topic has been closed for replies.

1 reply

Bernd Alheit
Community Expert
November 4, 2020

How does you add the headers?

New Participant
November 4, 2020

Hi Bernd,

 

I used the Action Wizard and the Add Header & Footer tool. 

try67
Community Expert
November 4, 2020

You need to use a script. For example, you can add a unique (read-only) text field to each page and then apply that text as its value. There's no built-in option of doing that with the Add Header & Footer tool.