JavaScript for Acrobat get filed value from another file pdf
I have struggled to read the value from the form filed in doc1 and write in another field in doc2
I have two pdf document, for example:
doc1:
Text filed with name Text1
Text filed with name Text2
Button filed with name Button1
doc2:
Text filed with name Text1
Text filed with name Text2
doc1, mouse enter event on Button1, action Run a java script
var doc = app.openDoc("doc2.pdf", bHidden) ;
getField("Text1").value = doc.getField("Text1").value;
this code not working
If I try to copy data from one text field to another in the same pdf document that works
getField("Text1").value = doc.getField("Text1").value;
My question is how I can read text field value from doc2 and copy it into text field in doc1?
