Copy link to clipboard
Copied
Hello all!
I have a fillable form with an attached pdf file. Rather than the user having to enter the same information (i.e. name, title...etc.) Is it possible for the data fields to mirror each other from one PDF to the attached PDF? maybe using javascript?
Thank you in advance!
Yes, there are a few different ways to approach a solution.
If the scripts have to be on the PDF, then a script on the main doc can acquire field values from an attached file, or write values to an attached file. It doesn't work the other way around when you are doing this directly thru the doc objects because an embedded file doesn't know who it's parent is, or have the abilty to directly access it.
But the main file can open an attachement PDF with
"Doc.openDataObject()".
This opens the atta
...Copy link to clipboard
Copied
Yes, there are a few different ways to approach a solution.
If the scripts have to be on the PDF, then a script on the main doc can acquire field values from an attached file, or write values to an attached file. It doesn't work the other way around when you are doing this directly thru the doc objects because an embedded file doesn't know who it's parent is, or have the abilty to directly access it.
But the main file can open an attachement PDF with
"Doc.openDataObject()".
This opens the attached file as hidden. The user doesn't see it, but its visible to JavaScript for accessing the fields.
Here's the reference entry:
This type of scirpt best placed in a button on the main PDF.
Another method is to write data to a common location, where the other file can read it. This is not as easy as it used to be from a document script. But I still think there are some gobal objects that will work for his, such as the color object. Again this type of script is best placed in a button the user presses to update data.
Copy link to clipboard
Copied
Thank you so much! Thom! i"m gonna try this today.