Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Replacing placeholder text in PDF headers with Filename

New Here ,
Nov 04, 2020 Nov 04, 2020

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?

TOPICS
Acrobat SDK and JavaScript
721
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2020 Nov 04, 2020

How does you add the headers?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2020 Nov 04, 2020

Hi Bernd,

 

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2020 Nov 04, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2020 Nov 04, 2020
LATEST

For the filename use form text fields or watermarks.

Javascript can't replace the XX.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines