Highlighted

How to automatically show filename in Acrobat DC header

New Here ,
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

75

Likes

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

How to automatically show filename in Acrobat DC header

New Here ,
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

76

Likes

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
Nov 03, 2020 0
Adobe Community Professional ,
Nov 03, 2020

Copy link to clipboard

Copied

What script have you found?

Likes

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
Reply
Loading...
Nov 03, 2020 0
New Here ,
Nov 03, 2020

Copy link to clipboard

Copied

Likes

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
Reply
Loading...
Nov 03, 2020 0
Adobe Community Professional ,
Nov 03, 2020

Copy link to clipboard

Copied

This script will work in Acrobat Reader and Adobe Acrobat.

Likes

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
Reply
Loading...
Nov 03, 2020 0
Most Valuable Participant ,
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?) 

Likes

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
Reply
Loading...
Nov 03, 2020 0
New Here ,
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 ..."

Likes

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
Reply
Loading...
Nov 03, 2020 0
Most Valuable Participant ,
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.

Likes

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
Reply
Loading...
Nov 03, 2020 0
Most Valuable Participant ,
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?) 

Likes

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
Reply
Loading...
Nov 03, 2020 0
New Here ,
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

Likes

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
Reply
Loading...
Nov 03, 2020 0
New Here ,
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.

Likes

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
Reply
Loading...
Nov 03, 2020 0
Most Valuable Participant ,
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.

Likes

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
Reply
Loading...
Nov 03, 2020 0
Most Valuable Participant ,
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...

Likes

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
Reply
Loading...
Nov 03, 2020 0
New Here ,
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?

Likes

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
Reply
Loading...
Nov 03, 2020 0
Most Valuable Participant ,
Nov 03, 2020

Copy link to clipboard

Copied

What "info in the header", exactly?

Likes

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
Reply
Loading...
Nov 03, 2020 0
New Here ,
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?

Likes

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
Reply
Loading...
Nov 03, 2020 0
try67 LATEST
Most Valuable Participant ,
Nov 03, 2020

Copy link to clipboard

Copied

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.

Likes

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