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

How to automatically show filename in Acrobat DC header

Community Beginner ,
Nov 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

Hi,

 

I need to show the name of the file in the document header. I found a script for that purpose for the reader but for a professional product I think there should be a builtin way of grabbing the filename for the header as a default. Unfortunately I could not find the internal names of the properties. Can anyone help?

 

Thanks.

 

Susanne

TOPICS
Create PDFs

Views

3.2K

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 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

What script have you found?

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 Beginner ,
Nov 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

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 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

This script will work in Acrobat Reader and Adobe Acrobat.

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
LEGEND ,
Nov 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

Do you actually have Acrobat (the paid for product)? Or do you just have Acrobat Reader (the free product?) 

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 Beginner ,
Nov 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

Hm, I thought my statements where quite explicit:
"I found a script for that purpose for the reader but for a professional product ..."

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 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

Do you mean that you think it works in Adobe Reader but not Adobe (Acrobat) Pro? Because if so, that's not the case.

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
LEGEND ,
Nov 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

I think maybe there is a "not" missing from your statement, I did not find it clear. Or do you believe there is a "professional Reader product"? Anyway, why not just answer my question, I wouldn't have asked it if I clearly understood it. Do you actually have Acrobat (the paid for product)? Or do you just have Acrobat Reader (the free product?) 

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 Beginner ,
Nov 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

NO - I thought that inserting the filename in the header or footer should be part of a professional software - sure that with the reader you have to do some more work to have that feature, but I had expected it to be included in DC

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 Beginner ,
Nov 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

The title of my thread is

How to automatically show filename in Acrobat DC header

I think that is quite clear unless you read reader instead of header.

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 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

But in the text you mentioned "the reader" and then "a professional product", so it is confusing, because those are the names of the two variants of the Acrobat product, Adobe Acrobat Reader DC and Adobe Acrobat Pro DC... Either way, there's no "built-in" way to do it, beside using a script.

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 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

You have to use a script to do it, but it's very simple. Create a (read-only) text field called "FileName" and add the following code under Tools - JavaScript - Document JavaScripts (NOT inside a function):

this.getField("FileName").value = this.documentFileName;

 

Of course, the file name also appears in the title of the application window (unless there's a title and it is set to show that instead), but you seem to want it to appear on the page itself, too...

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 Beginner ,
Nov 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

Ok, I inserted that line, but how do I get hold of the info in the header?

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 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

What "info in the header", exactly?

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 Beginner ,
Nov 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

I inserted the js-file in Acrobat DC -

text of script file:

 

this.getField("FileName").value = this.documentFileName;

How do I manage to have the filename in EVERY pdf I create?

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 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

LATEST

You can use an Action to insert the field and the script into multiple files, but it's not going to do so automatically, unless you use something like the PDFMaker plugin in Office and configure it to run this Action after creating new files.

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