Hi
I have a requirement like after user fills the PDF form, The user should be able to save the XML of that PDF form in his/her local machine.
We have to provide a button which prompts user for the save dailog box to save the XML.
Is this possible in Designer? If yes, how
Pls help.
Thanks
Abhiram
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Did you select "import/export data"?
Try paring back the script to xfa.host.exportData();
Check the JavaScript console (Control+J) when opened in Acrobat and see if any errors come up when the button is clicked.
Niall
Views
Replies
Total Likes
Hi Abhiram,
The you can import and export data from a form in Acrobat.
If the user has Reader then they will only be able to import/export XML if the form has previously been Reader Enabled using the full LC Reader Extensions ES2 server product.
See summary here: http://assure.ly/gYyYc2.
Please note that if a form has been Reader Enabled in Acrobat, then the ability to import/export XML is still not available AND it will also not be available in Acrobat.
Hope that helps,
Niall
Views
Replies
Total Likes
Before applying User Rights (RM) or Reader Extended(RE), in the designer , you must write this piece of JavaScript on 'click' of the button
xfa.host.exportData("",0);
------------------------------------
param1
(Optional)
Specifies the location and file name of the file where the data will export. If you omit this parameter, a dialog box opens to let the user select the file
manually.
param2
(Optional)
Specifies the export format for the data.
• true | 1 (JavaScript) or 1 (FormCalc) (Default)
Export to XDP format.
• false | 0 (JavaScript) or 0 (FormCalc)
Export plain XML data.
Note, the above piece of code will only if you apply any RE or RM.
Regards,
skriw
Hi skriw,
I have wriiten xfa.host.exportData("",0); in a Regular button click event.
After that i have reader extended the form as mentioned by you.
Still, the finctionality is not working. let me knw if i am doing something wrong.
Pls help.
Thanks
Abhiram
Views
Replies
Total Likes
Hi,
How have you Reader Enabled the form?
Did you Reader Enable in Acrobar OR in LC Reader Extensions ES2?
Niall
Views
Replies
Total Likes
Hi,
Yes. I have reader enabled the form using LC Reader Extensions ES2.
Thanks
Abhiram
Views
Replies
Total Likes
Hi,
Did you select "import/export data"?
Try paring back the script to xfa.host.exportData();
Check the JavaScript console (Control+J) when opened in Acrobat and see if any errors come up when the button is clicked.
Niall
Views
Replies
Total Likes
Thanks all..It's working
Views
Replies
Total Likes
Hi,
Further, there is another requirement.
The buttton which we use to export the XML data should be of SUBMIT TYPE, But in submit type we cannot handle the click event.
Is there any way to save the XML locally now?
Thanks
Abhiram
PS: The reason for a submit type button is to validate the form before saving the XML.
Views
Replies
Total Likes
Hi Abhiram,
What kind of validation you want to do before generating XML?
Actually, even I tried Submit type option. It only works over email, webservice etc.
Regards,
skriw
Views
Replies
Total Likes
Hi Skriw,
I want my client side validations to fire before saving it to XML.
Views
Replies
Total Likes
You could use 2 buttons.
One hidden button will have Control Type of Submit, and Submit As of XML/XDP.
The visible button will be Regular and in the Click event handler, execute the validation code, then the "Click" event of the hidden (Submit) button.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies