Stamping the Filename into the first page of the PDF

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I have a bunch of PDF files. I want to stamp (write) the file names into the first page of the PDF file. I found a small Javascript to do the task.

//get page boundries
var rc=this.getPageBox("Crop",0);
//adjust page boundries
rc=[0,rc[1]-18,rc[2],rc[1]-36];
//get document file name
var nm=documentFileName.replace(/.pdf/,"");
//add the field on page 1
var f=this.addField(nm,"text",0,rc)
f.alignment="center"
f.value="Let's discuss this during our next meeting";
f.textSize=12;


(source: https://answers.acrobatusers.com/Add-co ... 36525.aspx)
But, I cannot figure out how to pass the script into Hazel.

Can you guys help me?
Dellu
 
Posts: 20
Joined: Thu Dec 12, 2013 6:26 am

Did you check the help? Search for Javascript there for info on how to integrate your script.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support