These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Add filename, page number in batch.

jzyj53
Registered: Mar 15 2007
Posts: 2

How can I add to the footer of a pdf in a batch process the "filename & extension, also Page ? of ?"? I have been able to add Page ? of ? in footers using batch but would like to use the filename and page # in one batch process. I am at a loss trying to do what I thought would be simple.

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This topic comes up a lot. I don't understand why Adobe has not added the file name to the footer tool in Acrobat.

Since File Name isn't in the default tools you'll need to add it with JavaScript. Unfortunately this is not a one line operation. Read this artical

[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/page_bounds/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/page_bounds/[/url]

It has code in it for adding a form field to a document. Since you want it on the footer on every page you'll need to write a loop like this. Make the field name the same on all pages.

for(var i=0;i

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script