I am looking for help with a script that would check a box in one pdf when it is checked in a seperate pdf
I am looking for help with a script that would check a box in one pdf when it is checked in a seperate pdf
var oDoc = app.openDoc("../otherfolder/OtherFile.pdf",this);if(oDoc)oDoc.getField("check").value = event.target.value;
var oDoc = app.openDoc({cPath: "../otherfolder/OtherFile.pdf",oDoc: this, bHidden: true}); // Open the target file but keep it hidden from the userif(oDoc) {oDoc.getField("check").value = event.target.value; // Change the valueoDoc.saveAs(oDoc.path); // Save the fileoDoc.closeDoc(true); // Close the file}
app.openDoc("/X/Safety/CrisisCommandCenter/MasterChecklist/TEST/01-MasterIndex.pdf");
this.path
if (oDoc!=null) {var fieldname = "d1";var f = oDoc.getField(fieldname);if (f!=null) {console.println("Applying value " + event.target.value + " to field '"+fieldname+"'.");f.value = event.target.value;} else {console.println("Can't find field called '"+fieldname+"' in this document.");}} else {console.println("oDoc is null");}
var oDoc = app.openDoc("X:/Safety/Crisis Command Center/Master Checklists/TEST/01-MasterIndex.pdf",this);
The exact solution depends on the specifics. But the first step is to make both documents visible to each other through the JavaScript model. This is done by setting the document "disclosed" property to true in a document level script.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script