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

How to automatically show filename in Acrobat DC header

Community Beginner ,
Nov 03, 2020 Nov 03, 2020

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

What script have you found?

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

This script will work in Acrobat Reader and Adobe Acrobat.

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

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

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

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

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

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

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

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?) 

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

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

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

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.

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

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.

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

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...

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

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

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

What "info in the header", exactly?

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

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?

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

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