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

Current Date using batch job

dynamic-art
Registered: Dec 22 2009
Posts: 2

Hey there,

I'm totally new to JavaScript because of a special job. I need to fill the current date to a bunch of PDF - always the same position on every single PDF. I found a JS to put the date to a field

var date= this.getField("date");
var now = new Date();

var day= now.getDate();
var month = now.getMonth() +1;
var year = now.getYear() +1900;

Now: how can I automatically create that special field and fill it?

Thank you!

My Product Information:
Acrobat Pro 9.2, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
You need to use the addField method of the document object.

My advice is to first create the field manually, use the console to get its rect property and then use that in the script.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com