I made an interactive PDF with InDesign contain some textfields and a button. When this button is pushed I want it to extract the values from the textfields and put these into an XML file. So what this button has to do is call the action "Export form data" with as file extension *.xml. I thought this can be done using javascript (within the actions tab in the properties of the button), but I can't seem to find it.
I have Adobe acrobat Pro 10 and I work on a mac.
I already tried following codes:
this.saveAs("../Test.xml" , "com.adobe.acrobat.xml-1-00");
and
var name = getField("name").value;
var jobId = getField("jobId ").value;
var fieldsToSubmit = ['name', 'jobId'];
this.submitForm
({
aFields: fieldsToSubmit,
cSubmitAs: 'XML',
cPath: "../"
});
This last one works if I use cURL instead of cPath with an email address defined. But this isn't really what I need. The XML file should be submitted to an local storage for example "/users/MyDocuments/Folder/filename.xml".
Can someone please tell me what I'm doing wrong ? Or is this impossible ?
Kind regards
Michiel