Invalid File Specification Object
I am attempting to export the meta-data about the files contained in a PDF portfolio. I am using the code below which I copied from this link.
// code follows
var d = this.dataObjects;
var csv = '';
if (d) {
cfl = this.collection.fields.length;
tx_cols = new Array();
tx_names = new Array();
for (i = 0; i < cfl; i++) {
tx_cols.push(this.collection.fields.text);
tx_names.push(this.collection.fields.name);
}
csv = tx_cols.join() + "\r\n";
for (var i = 0; i < d.length; i++) {
tx_data = new Array();
for (var r = 0; r < cfl; r++) {
tx_data.push("\"" + d.getFieldValue(tx_names
// tx_data.push(d.getFieldValue(tx_names
}
csv += tx_data.join() + "\r\n";
}
this.createDataObject({cName:"EmailData.csv", cValue:csv,cMIMEType:'text/csv'});
this.exportDataObject("EmailData.csv");
this.removeDataObject("EmailData.csv");
}
// end of code
I am able to execute it but I receive this error:
RaiseError: Invalid file specification object.
Data.getFieldValue:31:Console undefined:Exec
===> Invalid file specification object.
undefined
I haven't worked with JavaScript previously so I will be looking at the Adobe docs but, since this it time critical, I was hoping not to have to work thru everything from the beginning. Does anyone have any suggestions where to begin? I am using Acrobat Pro DC.
Thank you,
