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

Replacing placeholder text in PDF headers with Filename

New Here ,
Nov 04, 2020 Nov 04, 2020

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?

TOPICS
Acrobat SDK and JavaScript

Views

413

Translate

Translate

Report

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

Copy link to clipboard

Copied

How does you add the headers?

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Hi Bernd,

 

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

Votes

Translate

Translate

Report

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

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

For the filename use form text fields or watermarks.

Javascript can't replace the XX.

Votes

Translate

Translate

Report

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