Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
How does you add the headers?
Copy link to clipboard
Copied
Hi Bernd,
I used the Action Wizard and the Add Header & Footer tool.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
For the filename use form text fields or watermarks.
Javascript can't replace the XX.