I need to pre populate five fields when the user opens the form using Acrobat Reader (name title, address, etc). The values will be stored in an xml data file in the same directory as the form (no database connections or web services needed). I've tested the xml and form structures using Forms -> Manage Form Data -> Import Data and all works fine. Now, I need to mimic this behavior programmatically so it will work using only Acrobat Reader. I can't find the magic java script command to import the data (I've tried xfa.host.importData and xfa.datasets.data.loadXML to no avail). Requiring purchasing Pro or the Livecycle server product is not an option. This seems like a basic requirement so I am hoping I am just being stupid and missing the obvious. Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Unless you are reader enabling the form with LiveCycle Reader Extensions ES, then users with Reader will NOT be able to import (or export) XML.
Summary here: https://acrobat.com/#d=3lGJZAZuOmk8h86HCWyJKg
Based on your description you are looking at options 2 and 3, users with Reader.
Sorry,
Niall
Views
Replies
Total Likes
Hi,
Unless you are reader enabling the form with LiveCycle Reader Extensions ES, then users with Reader will NOT be able to import (or export) XML.
Summary here: https://acrobat.com/#d=3lGJZAZuOmk8h86HCWyJKg
Based on your description you are looking at options 2 and 3, users with Reader.
Sorry,
Niall
Views
Replies
Total Likes
Niall:
Thank you for the on-point reply. Not the news I wanted to hear, but I appreciate the rapid response.
George
Views
Replies
Total Likes
Niall:
One more follow-up question. After reviewing the document below, if I go with Option 1 and require Acrobat Pro what is the java script command that performs the equivalent function as Forms -> Manage Forms Data -> Import Data... ? (xfa.datasets.data.loadXML and xfa.datasets.data.loadXML do not seem to do the trick.) Thanks,
George
Views
Replies
Total Likes
Hi George,
importData(); should work. A dialog window will open and the user will be prompted to select the xml file that they want to import. If you specify the actual file as a parameter, then the form will need to be certified. This leads to problems of maintaining the certificates and users having to confirm that they accept the certificate (trust it).
Good luck,
Niall
Views
Replies
Total Likes
Many thanks...
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies