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

File name with batch processing - javascript needed?

Phil_00
Registered: Dec 3 2010
Posts: 1

Hi there,
 
Im familiar with batch processing and i’ve found some information on the filenames, but I cant really get this to work. I have multiple PDFs and i’d like to add the file name of each PDF to the bottom of each page for our printer. I know this requires javascript, and so far the only code that i was able to get work, was an actually javascript file that i inserted into the adobe folder creating a new button to “print with file name” this was great, but didn’t help with my batch of files.
 
Thank you.
 
Phil

My Product Information:
Acrobat Pro 9.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
That automation script you downloaded contains a function which you might be able to use verbatim in the batch script.

But here's an easy solution. Place this one line script in a batch sequence.

this.addWatermarkFromText({cText:this.documentFileName,
nVertAlign:app.constants.align.bottom,
nVertValue:18});

This places the file name 1/4 inch above the bottom of all pages in the PDF.

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