Thread View: adobe.scripting
3 messages
3 total messages
Started by debbie_foster
Wed, 25 Aug 2004 21:59
How do I add the same field and javascript to multiple documents
Author: debbie_foster
Date: Wed, 25 Aug 2004 21:59
Date: Wed, 25 Aug 2004 21:59
1 lines
754 bytes
754 bytes
I have a 1000 documents that I need to add a field and a javascript to. Is there a way to do this using a batch solution?
Re: How do I add the same field and javascript to multiple documents
Author: George_Johnson
Date: Thu, 26 Aug 2004 20:40
Date: Thu, 26 Aug 2004 20:40
3 lines
981 bytes
981 bytes
Sure, you can use the "addField" JavaScript method to add a field to a document, and the "setAction" field method to add a JavaScript to a field event. To add a document-level JavaScript, you can use the "addScript" document method. More information is in the Acrobat JavaScript reference, but post again if you get stuck. George
Re: How do I add the same field and javascript to multiple documents
Author: debbie_foster
Date: Tue, 31 Aug 2004 21:16
Date: Tue, 31 Aug 2004 21:16
15 lines
1439 bytes
1439 bytes
George,
I looked up the Acrobat JavaScript reference and found the "addField" and "setAction" but I am still confused as to where and how to use these actions. Do I go under batch processing and add a new javascript there? The script I wanted to use is as follows with the field called Date1:
var dField = this.getField("Date1");
dField.value == "";
dField.alignment="center";
dField.textColor = color.red;
dField.fontWeight = 600;
var nDate = new Date();
dField.value="Only the online system will contain the current revision. Printed documents shall be verified against the online system before use." + � This document was printed " + util.printd("ddd mmm dd, yyyy", nDate)+".";
dField.multiline = true;
dField.readonly = true;
Please help!
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads