BASALT · JOURNAL
Why your PDF shows a different name when you open it
Your PDF shows a different name than its file name because the file carries a second name inside it, the Title property. Some viewers, including some web browsers' built-in PDF viewers, show that Title in the window or tab instead of the name you see in Finder. Renaming the file doesn't touch it.
The Title usually comes from the document the PDF was made from, or from a template somebody started with. That's why a file called "Invoice-final.pdf" can open as "Old template v3". It can also mean the title leaks an old project name, a client or a draft label you never meant to share.
Two names, stored in two places
The file name belongs to the file system. It lives in the folder entry, so renaming in Finder or in a Save dialog changes it, and the PDF's bytes stay the same.
The Title belongs to the PDF. It sits in the document information dictionary as /Title, and it can also sit in the XMP packet as dc:title. What XMP metadata is explains that second store. The two can disagree, because different software writes them.
A PDF can also ask a viewer to show the Title. The catalog may contain a viewer preference, /DisplayDocTitle, and when it's true a reader that honors it puts the Title in the window title instead of the file name. The default is false.
How a given viewer behaves varies, so there's no rule that applies to every one. If two apps show different names for the same file, the Title is the first thing to check.
Where the Title comes from
Most Titles are set by software, not typed by a person on purpose.
- A word processor can fill the Title from the document's own properties when you export to PDF, and some may use other text such as a heading.
- A template carries its title into every file made from it, so a hundred invoices can share the name of the template.
- A file that has been merged or converted can keep the Title of one of its sources.
- An app may fill the Title with the project's name rather than the exported file's name.
Saving the PDF under a new file name later changes none of this. That's the usual cause of the mismatch: the file was renamed after export, and the Title stayed behind.
How to see the Title on a Mac
In Preview, choose Tools > Show Inspector, or click the Info button in the toolbar, and open General Info. The Title row shows the stored title from the information dictionary. None of the Inspector's panes shows the XMP packet.
In Terminal, Spotlight's reading of the file puts the title in kMDItemTitle. This works only for files in places Spotlight indexes:
mdls -name kMDItemTitle document.pdf
Elsewhere, such as a temporary folder, mdls prints the file name as the title on macOS 15, which looks like an answer and isn't one. For a file anywhere, a test import reads the real title and stores nothing:
mdimport -t -d2 document.pdf
Spotlight leaves out XMP, and so does PDFKit, the PDF framework built into macOS: a file whose only title was in XMP showed no title in either. If a browser shows a title that Preview doesn't, that's one likely reason, and the XMP packet is where to look. With qpdf installed (brew install qpdf), start at the trailer:
qpdf --show-object=trailer document.pdf
The output includes a line like /Info 6 0 R /Root 5 0 R. Print the information dictionary and the catalog by those numbers, using your file's own:
qpdf --show-object=6 document.pdf
qpdf --show-object=5 document.pdf
The first shows /Title and the other fields. The second shows the catalog, where /ViewerPreferences << /DisplayDocTitle true >> would appear if the file asks viewers to show the Title, and /Metadata if there's an XMP packet. To read that packet, print the object it names with qpdf --show-object=7 --filtered-stream-data document.pdf, again with your own number.
How to change the Title
Fix it where the file was made. Open the document in the application that produced it, change its title in the document properties, and export the PDF again. Then check the new file with Preview's Inspector. Editing the PDF afterward is the worse route, because a second tool can rewrite other fields as it saves.
If your source application has no title field, look for what it uses instead, such as the project name, and change that.
Check the XMP too. A tool that updates the information dictionary may leave dc:title unchanged, and the reverse is also possible. The Producer field can hint at which software wrote the file last, and what Quartz PDFContext means explains one common value.
How to remove the Title
If the file shouldn't carry a title at all, remove it rather than rewriting it. Removing needs a tool that clears document properties, and it must clear both stores, since a title left in XMP can still show up in some viewers. Removing metadata from a PDF on a Mac goes through the options and the checks that prove it worked.
After removing it, a viewer that showed the Title should fall back to the file name. Open the new copy in the viewer where you saw the problem and look at the window or tab title again.
Why a PDF shows an author name covers the same kind of leftover in the Author field, which is usually filled by the same software at the same moment.
Frequently asked questions
Why is my PDF showing a different name when I open it?
Because the file has a Title property that differs from its file name, and some viewers, including some browsers' built-in PDF viewers, show the Title instead. The file name lives in the file system and the Title lives inside the PDF. Renaming the file never changes the Title.
Why does my PDF have a different title than its file name?
The Title was probably set by the software that made the PDF, from the source document's properties, its first heading or a template, and the file was renamed afterward. The two names are stored in different places and nothing keeps them in step. Preview's Inspector shows the stored Title.
How do I see a PDF's title on a Mac?
Open the file in Preview and choose Tools > Show Inspector, then open General Info and read the Title row. In Terminal, mdls -name kMDItemTitle document.pdf prints Spotlight's reading of it for a file in an indexed folder. Spotlight ignores XMP and Preview has no XMP view, so check a title stored only there with qpdf.
How do you change the title of a PDF document?
Change it in the application that made the PDF, in its document properties, then export the file again. Check the new file in Preview's Inspector afterward. Editing the finished PDF is less reliable, because the title can exist in two places and a tool may update only one of them.
Does renaming a PDF change its title?
No. Renaming changes the file system entry only. The /Title in the information dictionary and any dc:title in the XMP packet stay as they were, which is why a renamed file can still open under its old name in a viewer that shows the Title.
Can a PDF title leak private information?
Yes. A Title left over from a template or a source document can carry an old project name, a client's name or a draft label, and it travels with every copy. It's a short string and easy to overlook, because it only appears in a window title or a tab. Check it before you send a file outside your organization.
What does DisplayDocTitle do in a PDF?
It's a viewer preference in the document catalog. When it's true, a reader that honors it shows the document's Title in the window title bar instead of the file name. The default is false. Whether a particular viewer follows it varies, and some show the Title anyway.
Doing it in Basalt
Basalt won't set a title. It can tell you whether one is there and remove it. The Inspect tool reports which document properties are filled, including Title, and whether an XMP packet is embedded, without quoting what they say. For the removal, the Strip metadata step in Run a Procedure rebuilds the file from its pages and leaves the whole information dictionary, Title included, and the XMP packet behind. The stored dates, bookmarks and tags don't survive the rebuild either. The result is a new file, so your original isn't changed, and the engine that opens documents has no network entitlement. Basalt costs $29 once for up to three Macs and is free for 24 hours. If you need a different title, set it in the source application and export again.
Redaction that proves itself
Basalt destroys the content you mark, then re-opens the file it wrote and proves the content is gone before it saves anything. Your documents never leave your Mac.