Acrobat offers a number of ways to stamp information on documents using either the Headers/Footers function or Bates Stamping.
Unfortunately— out of the box— Acrobat does not allow you to stamp the document File Name on the document very easily.
Why would I need to stamp a file name on the document?
There are a number of legal workflows (discovery, exhibit preparation) that may result in the renaming of files. Preserving the original file name may be important so that you can establish the provenance of a file.
In addition to the file name, PDF documents also have a Document Title property which is different than the file name.
You can view the Document Title property of a PDF by choosing File> Properties and clicking on the Properties tab:

Fortunately, Acrobat X Pro Actions come to the rescue!
With a bit of JavaScript, we’ve put together a useful add-on for anybody who wants to stamp filenames on documents.
Acrobat X File Name Stamper Action
The Acrobat X File Name Stamper Action automates the process of stamping:
- File Name
- File Name + Date
- Document Title
- User-entered text
When you run the Action, you’ll be asked to select the files you wish to process. Then, you can choose various options in the Actions window:

How do I get the File Name Stamper Action?
You can get the Filename Stamper Action over on the Actions Exchange on AcrobatUsers.com,
Alternately, you can download it direct below.
The PDF document you download below includes:
- Installation and use instructions
- Action (embedded in the PDF)
Enjoy!
|
Filename_Stamper.pdf (682K) Hint: Right-click and Choose Save Target As . . . to save to your desktop You will need Acrobat X Pro to run the Action |
![]() |


is there any way to apply the filename without the .pdf part?
No. If you do not apply the filename, the file won’t open.
You can apply the filename without the “.pdf” part, with this Javascript:
===============
/* TruncatedFilename_Singlepage */
var truncatedFileName = this.documentFileName.replace(/\.pdf$/i, “”);
var pageAmount = this.numPages;
this.addWatermarkFromText({
cText: truncatedFileName,
nStart: 0,
nEnd: 0,
nFontSize: 13,
nTextAlign: app.constants.align.right,
nHorizAlign: app.constants.align.right,
nVertAlign: app.constants.align.top,
nHorizValue: -25, nVertValue: -15
});
===============
This is handy if you have a bunch of files named “Exhibit 1.pdf”, “Exhibit 2.pdf”, etc. and you want to have the PDF’s stamped/watermarked “Exhibit 1″, “Exhibit 2″, etc.
Is there any way to not have it prompt you with the options dialog box for every file when you have selected multiple files for it to do this to?
I have thousands of files that need to be stamped. This is a cool action, but hardly automation if I have to intervene for every file.
You need to change the Action Save options to not ask you.
This is a great tool! Unfortunately, I don’t know any js, and I cannot figure out how to automate multiple files. As Ed pointed out, the options dialog box appears before each file.
Rick, I perhaps misunderstood your response, but I do have the Action “Save To: The same folder selected at start,” but the options box appears each time. Any suggestions?
Yes, that was how this Actions was developed. You can just hit Enter repeatedly.
Hello Rick – Has anyone reported any computer problems after using the new Stamp File feature in Acrobat X?
No. Any issues would be confined to Acrobat and could be reversed by uninstalling the stamp.
Downloaded and imported with no problems.
We use the entire file name on our documents
What would I need to change in the js to have the “file name w/path” as one of the options?
I wish I could support you on that, but I’m not a JavaScript person. Check out pdfscripting.com
Hello!
I would like to be able to save a mail merge in word as a pdf and in the process assign the name of the file from the original merge list, i.e. “Company Name”. Any ideas?? Help!!
I don’t think that is possible using our Mail Merge feature for Word. The same file name for the PDF is sent to every recipient. Evermap.com has a tool that can split into PDFs from text found on document called AutoSplit. Using it, you could print the completed merge to PDF and then use the plug-in to extract the files and name them by recipient.
I cannot run this action on my Mac OS X Lion with Acrobat X. It freezes on the first doc every time and I have to abort. Any thoughts?
I was able to run it on my Mac OSX Lion, so I’m not sure what the issue might be.
Hi Guys Thank you very much for excellent script. Is there any way the file name without .pdf part can be included in the regular script, say as a radio button option or a check box?
I am sorry that I am not that good in scripts.
Thanks a lot for your help.
You’d need to talk to the developers over at windjack.com
I also am not familiar with JS but figured it out.
Go to the line
var strLabel = global.FileNameStamp.strDocStamp.replace(/\n/g,”\r”);
Then add this line below that
var strLabel = global.FileNameStamp.strDocStamp.replace(/\.pdf$/i, “”);
so it looks like
var strLabel = global.FileNameStamp.strDocStamp.replace(/\n/g,”\r”);
var strLabel = global.FileNameStamp.strDocStamp.replace(/\.pdf$/i, “”);
Seems to be working…..
Now if we can automate the list of pages added so all files would be stamped without having to keep hitting “Apply” or the enter key.
An “Apply All” would be nice
Thanks for sharing.
is there any way to print the whole path in addition to the filename?
I assume you mean to add the filename of a PDF onto the document as a header or footer. Unfortunately, not out of the box.
Hi Rick,
Do you know if there’s a way I can add a “Page 1 of N” in this process?
You can do that easily with the Header & Footer feature. It is one of the numbering choices.