I am using acrobat XI I have tried output a text file like this
var cMyC = \"abc\";
var doc = this.createDataObject({cName: \"test.txt\", cValue: cMyC});
this.e
Here's a way to output to a fixed path text file using doc.exportAsText
:
// set up output text
var TEMP_FIELD_NAME = "testHeader"
var textValue = "test";
// add a temporary text field
var f = this.addField(TEMP_FIELD_NAME, "text", 0, [30,30,100,20]);
f.value = textValue;
// export field name and value to defined file
this.exportAsText({aFields: TEMP_FIELD_NAME, cPath: "test-text.txt"});
// remove text field
this.removeField(TEMP_FIELD_NAME);
The resulting text file will have two lines:
testHeader
test