How do I make the PDF document title the same as the file name
Copy link to clipboard
Copied
We often receive several hundred PDFs that have the Initial View set to document title rather than file name. Is there a batch process that can be used to either rename the document title to match the file name or to remove the document title. We are using Acrobat Pro DC on Windows 10.
Copy link to clipboard
Copied
You can use the Action Wizard in Acrobat Pro.
Copy link to clipboard
Copied
Could you provide further instruction on how to do so. Thanks.
Copy link to clipboard
Copied
There you can change the initial view of documents.
https://helpx.adobe.com/acrobat/using/action-wizard-acrobat-pro.html
Copy link to clipboard
Copied
Info about using Acrobat's Action Wizard is at https://helpx.adobe.com/acrobat/using/action-wizard-acrobat-pro.html
| PubCom | Classes & Books for Accessible InDesign, PDFs & MS Office |
Copy link to clipboard
Copied
This is how I did it in Acrobat Reader 23 (Jan 2024):
1. In the very top left corner click the hamburger menu (three lines).
2. Select "Preferences".
3. Now in that Preferences window, on the left hand pane (Categories), select "Documents".
4. In the right hand pane check the box titled "Always use filename as document title".
5. Click the "OK" button.
Copy link to clipboard
Copied
Moderator's note:
@C34923026z5q7's suggestion is not the correct answer to the problem and I have UNchecked it as correct:
This is how I did it in Acrobat Reader 23 (Jan 2024):
1. In the very top left corner click the hamburger menu (three lines).
2. Select "Preferences".
3. Now in that Preferences window, on the left hand pane (Categories), select "Documents".
4. In the right hand pane check the box titled "Always use filename as document title".
5. Click the "OK" button.
It changes only the perference settings for that particular version of Acrobat installed on that particular computer.
It does not change the setting in the PDF itself so that it can be correctly read on ANY computer with any PDF reader.
To meet accessibility requirements and laws, the PDF file must be compliant for everyone who accesses the file, regardless of whether they use an Adobe brand of PDF reader (like Acrobat) or another vendor's, and regardless of how they've set their personal preferences. The FILE itself must be compliant.
--Bevi
[Moderator, and US delegate to the ISO committees for PDF and PDF/UA accessibility standards]
| PubCom | Classes & Books for Accessible InDesign, PDFs & MS Office |
Copy link to clipboard
Copied
Worked great! Thank you!
Copy link to clipboard
Copied
In order for hundreds of PDF files to meet accessibility standards and laws, try this combo as suggested by @Bernd Alheit and @BeviChagnon earlier in this thread.
Use Acrobat's Action Wizzard to automate these steps in each individual PDF file. OR create your own script to perform these actions.
- Open the metadata dialogue for each individual PDF: File / Document Properties.
- In the Description tab, ensure that the Title field is filled in with the exact title of the document. Usually that's the same text in the first <H1> used in the document, such as on its cover.
- In the Initial View tab, set the option to use the Title, not the file name. This will force any PDF reader program to show the title when the PDF is viewed by the end user.
- Save and close the PDF file.
There might be existing 3rd-party software that can do this, but I don't know of any.
Maybe one of our Acrobat scripting gurus in this forum could write a script for this. Publish it. And we could all buy it! 🙂
| PubCom | Classes & Books for Accessible InDesign, PDFs & MS Office |
Copy link to clipboard
Copied
The script to use is this, by the way:
this.info.Title = this.documentFileName;
Note this is NOT dynamic, so if you rename the file after running it, the title won't automatically update as well.
Copy link to clipboard
Copied
This is also possible:
this.info.Title = "";
Copy link to clipboard
Copied
I thought they wanted to set the title to the file name. That will just clear it.
Copy link to clipboard
Copied
I created an implementation of a free, open source program called ExifTool to update the PDF meta properties as a batch process.
It batch processes all the PDF files found in a target folder, updating the PDF meta data fields, "Author" and "Creator" with specified values like: "Your Company Name". Then it writes the Filename to the PDF "Title" property field.
It's fast and free, and you don't need to be an administrator to run it, and it runs in situ, needing no installation on Windows.
Steps to recreate:
Download ExifTool from the web: https://exiftool.org/. I used the Windows executable version.
Create a folder on your desktop and give it a name. I named my folder "Exiftool"
Create a ".bat" file in the new folder and call it "Clickme.bat" and copy this code into it:
@ECho off
cmd /min /C "set __COMPAT_LAYER=RunAsInvoker"
for /r "%cd%" %%x in (*.pdf) do call "ExifSys\PDF-Properties.bat" "%%x"
cls
Create a subfolder under "Exiftool" called "ExifSys".
Copy the Exiftool.exe executable into the "ExifSys" folder.
Create another ".bat" file in ExifSys called PDF_Properties.bat
Copy this code into PDF_Properties.bat (customize the author and creator to your desired values)
@ECho off
"ExifSys\exiftool.exe" -overwrite_original -Title="%~n1" -Author="Your Author Name" -Creator="Your Comapny Name" %1
Put another copy Exiftool.exe in the Exiftool folder and rename it to "Exiftool.exe(-k)" - Drag PDF files onto this version to inspect properties in the PDF file.
Copy one or more PDF files into the Exiftool folder and click "Clickme.bat"
Exiftool should update all the PDF files in the folder very quickly.
You can check them afterward by dragging them onto "Exiftool.exe(-k)"
Here are some more instructions for use you can add to the folder as a "Readme.txt" file:
README.TXT
This folder is set up to batch process PDF files and edit thier Meta-Data Proprties.
Instructions:
1.) Copy one or more PDF files into this ExifTool folder.
2.) Rename the files to have a meaningful filenames. The filenames will become the document Titles that appear in links on the website.
3.) Double click the shortcut labeled "ClickMe.bat".
This will run the program and all the PDF files contained in the folder will have the following properties adjusted:
"Title" property will be set to the filename (without the ".pdf" extension)
"Author" and "Creator" property will be changed to "Your Company Name"
4.) Optionally, drag any individual PDF file onto the shortcut labeled "ExifTool(-k).exe".
A command window will appear displaying all of the PDF properties for that file.
You can use this to confirm the program worked as intended.
Copy link to clipboard
Copied
I'm not able to edit my original message. But it contained an error. The optimized version of this Exiftool process does not require "PDFPorperties.bat". In fact that earlier implementation is slower and inefficient.
ClickMe.bat should have this code in it:
@ECho off
cmd /min /C "set __COMPAT_LAYER=RunAsInvoker"
"ExifSys\exiftool.exe" -P -overwrite_original -ext PDF "-Title<Basename" -Author="Your Company Name" -Creator="Your Company Name" .
cls
REM The "dot" at the end of the line represents the current directory, do not edit it.
The ExifSys folder only need to have Exiftool.exe in it.

