Skip to main content
Participant
April 6, 2026
Answered

Using file name as document title not working

  • April 6, 2026
  • 1 reply
  • 66 views

In Acrobat Pro, within the Document area of the Preferences there is a checkbox to Always use filename as document title that has been enabled but does not seem to work.  When opening files and looking at the document properties the title field remains blank. 

Is there a way to make this work so the title field in the properties uses the file name?

    Correct answer Thom Parker

    Yes and No.  This is a bit confusing because of the terminology.  The title field in the document properties is a static property of the PDF.  The “title” referred to in the Acrobat Preferences is the text displayed on the document tab and on the Acrobat “title bar” when the document is current.  Notice that this setting is in the “Open Settings”, the Acrobat title is set when the document is opened, or selected as the current document.  The Acrobat preferences are in general meant to only affect values in Acrobat. They do not affect values in the PDF being displayed (except in some cases). 

     

    The title field in the PDF is set when it is created, or at some later time by the user or a tool. So it is possible to force the value of this field.  This line of code will do it.  Run it from the console window or an automation script.

     

    this.title = this.documentFileName;

     

     

    1 reply

    Thom Parker
    Community Expert
    Thom ParkerCommunity ExpertCorrect answer
    Community Expert
    April 6, 2026

    Yes and No.  This is a bit confusing because of the terminology.  The title field in the document properties is a static property of the PDF.  The “title” referred to in the Acrobat Preferences is the text displayed on the document tab and on the Acrobat “title bar” when the document is current.  Notice that this setting is in the “Open Settings”, the Acrobat title is set when the document is opened, or selected as the current document.  The Acrobat preferences are in general meant to only affect values in Acrobat. They do not affect values in the PDF being displayed (except in some cases). 

     

    The title field in the PDF is set when it is created, or at some later time by the user or a tool. So it is possible to force the value of this field.  This line of code will do it.  Run it from the console window or an automation script.

     

    this.title = this.documentFileName;

     

     

    Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
    Participant
    April 6, 2026

    Thank you, this does help clarify things a bit. I will try this script and report back.

    Pariah Burke
    Community Expert
    Community Expert
    April 7, 2026

    You may not want to script it, actually. Accessibility (Section 508, WCAG, EN 301 549) state that the Title should not be the file name, but rather a human-readable, descriptive title.