action wizard to process many pdf forms and create a csv file for each
trying to use action wizard to process many pdf forms and create a csv file for each, so far I have something like this but it does not seem to be working, any ideas?
if ( app.viewerVersion >= 7 ) {
this.createDataObject(this.title + ".xls");
// Get the file stream object of the embedded file
var oFile = this.getDataObjectContents(this.title + ".xls");
// Convert to a string
var myApp = util.stringFromStream(oFile, "utf-8");
// Get Field Names separated by comma
for (var i = 0; i < this.numFields; i++) {
myApp + this.getNthFieldName(i) + ",";
console.println("Field[" + i + "] = " + this.getNthFieldName(i));
}
// Add newline
var myApp = myApp + "\r\n";
// Get Field Values separated by comma
for (var i = 0; i < this.numFields; i++) {
var fieldName = this.getNthFieldName(i);
myApp + this.getField(fieldName).value + ",";
console.println("FieldValue[" + i + "] = " + this.getField(fieldName).value);
}
// Convert back to a file stream
var oFile = util.streamFromString(myApp, "uft-8");
// Now "overwrite" budget.xls
this.setDataObjectContents(this.title + ".xls", oFile);
} else {
app.alert("Acrobat 7.0 or later is required.");
}
