Javascript to populate data between dynamic XFA forms
Dear Thom,
let me ask you for professional advice on following:
I have a dynamic PDF form build in LiveCycle, which is basically an interactive pdf catalog. It is overloaded with graphic and has more than 30 Mbytes size. Last page of this form contains dynamic table which generates a purchase order information, based on user's selections.
My problem now is I need to extract that purchase order data saved as separate file. I need it because it will have much smaller size, so it can be easily emailed to supervising person, without the need to pass the whole 30 mbytes file.
I made some progress by creating a small-size analog file by removing all images and hiding the catalog pages, leaving only purchase order page visible. So basically it's the same file, having same fields structure. This allowed me to submit xml data from big file and then import it using Acrobat to small-size version.
What I want to achieve now is that user could have both files in his local folder, and after finishing working with large catalog file, just press a button, which would copy all the data (perhaps as xml) to small-size version, so only the purchase order page can be saved separately.
I read some info about usage of following command:
this.slave = app.openDoc("smallsizefilename.pdf",this);
and then copy field values by something like this:
var oEnd = this.getField ("endDate");
var sEnd = this.slave.getField("endDate");
sEnd.value = oEnd.value;
my problem is that my form is dynamic, so I can't make any fixed fields connections, like in the shown example.
I need to mention that copy data operation will take place offline, with both files located in the same folder. I hope this would make things easier.
I would be really thankful for any ideas to solve this task.
Thank you for all your great support.
Kind regards,
Sergiy.
Sergiy Kotenko