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

Batch process to add action script and text box.

DAF
Registered: Oct 12 2007
Posts: 2

Including the following script in the Document Will Print / Document Action script-box will populate a text box named DatePrinted with the current date and time, and this will show up on the printed document. This is exactly what I need, but now I have 3000 documents that need this line of code and a DatePrinted text box added to each of them. How can this be done? Is some sort of Acrobat batch processing a viable option?
 
this.getField("DatePrinted").value = "Printed: " + util.printd("mmm d, yyyy h:mm tt",new Date());
 
signed – please help a chemist

My Product Information:
Acrobat Pro 6.0.2, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Yes, you can do this from a Batch Script using the "doc.addField()" and "doc.setAction()" fucntions.

Read this Article:
[url=http://www.acrobatusers.com/tutorials/2007/js_add_buttons_to_pdf/]http://www.acrobatusers.com/tutorials/2007/js_add_buttons_to_pdf/[/url]

You can find an example of exactly this functionality in the sample scripts provided with this 3rd party tool

[url=http://www.windjack.com/products/acrobuttons.php]http://www.windjack.com/products/acrobuttons.php[/url]

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

Sabina Compassi
Registered: Jan 15 2009
Posts: 1
Thomp: I cannot open the article you posted.
I am looking for a Script to add through Batch Processing a Document Will Close Event.
the code to be added is simple:
{
this.dirty = false;
}

Sabina