• 0

How can I add the file name as the footer of a PDF?


Question

Inside Acrobat Pro, I see Document -> Header & Footer -> Add... I see how to add some text and I see how to add the date and I see how to add page numbers. Can I add the file name? I know how to do this in Word, so I'm hoping Adobe has included some similar functionality...

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0
Do it in Word before converting to PDF (assuming you're creating your documents that way)...
That's obviously not the case for the OP, unfortunately.

It's definitely doable through OLE automation, which means you'd have to write some VB script that accessed the JSObject and used the addWatermarkFromText method to place the filename where you wanted it. Not easy, but if I have some time today I'll try to throw together a program for you.

Link to comment
Share on other sites

  • 0

@ njlounch ... but for the file which is already in Pdf format

@ boogerjones ... searched a lot on google and came to know only by puttting a jscript in the adobe folder then u will get option in adobe......

Link to comment
Share on other sites

  • 0

Alright, I've attached a .NET application that will add the filename to the bottom center of each page of a PDF document. Note that this is not an efficient way of doing it since what OLE automation does is actually run a copy of Acrobat in the background. That means if the procedure fails, you might have a copy of Acrobat still running even though it's not visible. This can cause file access problems. Unfortunately I don't know of any other way of doing it without using an external PDF library. I've included the source code in case you don't trust me. I put this together in a few minutes; there is very little error checking so use it at your own risk.

Backup up your PDF files before testing this application. I tested it on Windows 7 RC with Acrobat Pro 9.0.

footer.zip

Edited by boogerjones
Link to comment
Share on other sites

  • 0

Hello,

I'm not sure if I can edit posts here, but I've updated it to have some more options, and the download links have changed:

 

Executabe (needs DLL in same directory as executable): http://saintjohnny.dyndns.biz/pdfFooterMarker%20(unzip%20and%20keep%20 DLL%20in%20same%20folder%20as%20executable).zip

 

 

Sourcecode: if you want it: http://saintjohnny.dyndns.biz/PDF%20Footer%20Source.zip

 

I've also added so that you can also stamp prefix/suffix before and after the filename, as well as stamp custom text.

 

(Big thanks to booger jones for providing the first source for me to modify)

In case anyone is wondering, reviewed the source and it seems clean.

BTW, I have no idea why you didnt port this to C#...

Link to comment
Share on other sites

  • 0

^ This is the third time that you've posted the solutions to issues with your own website promo. This is spamming our site. I removed your link. Please do not promote your website here as it is against our community rules. You will be banned the next time you do it.

Thanks!

 

Quote

Neowin Is Not A Support Forum For Other Sites.
Comparing, judging the content/value or raising the opinion of other sites, recruiting members or staff, bad mouthing (or victimizing) & negative discussion about non/affiliate site issues on our forums is neither wanted nor tolerated. Promotion of individual member sites or blogs will be deleted on sight.

 

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.