Folder Level Javascripts Not Working - Save To Txt
Hello. We are using folder level javascripts to save data from our PDF files to a text file for data imports. This worked very well on windows but now were trying to use the same system on a Mac Mojave 10.14.6 machine.
Currently it is creating the text file but it is not writing the data to the file. In this situation, the variable for our data is "lines". We ensured that the data is coming from lines by making its value ".txt" and adding it to the path.
Here is the code:
qipSaveCSV = app.trustedFunction(function(doc, path, lines) {
app.beginPriv();
myDoc = app.newDoc();
myDoc.saveAs(path, "com.adobe.acrobat.plain-text","", false, true);
var f = myDoc.addField("lines", "text", 0, [0, 0, 0, 0]);
f.multiline = true;
f.value = lines;
myDoc.saveAs(path, "com.adobe.acrobat.plain-text", "", false, true);
myDoc.closeDoc(true);
app.endPriv();
});
If you have any ideas as to why this isn't functioning properly, help would be greatly appreciated.
