JavaScript, Saving, temp file
Dear friends,
I need to edit a PDF file in Acrobat Reader and save it afterwards under the same name and location. The file is called by a DMS-App as a temp-file. I wrote a code for saving and closing:
// Meue Item
app.addMenuItem( { cName: "mySaveDoc", cUser: "Direktspeichern",
cParent: "File", cExec: "mySaveDoc(this, this.path)",
cEnable: "event.rc = (app.doc != null);",
nPos: "Open", bPrepend: true } );
//Function for saving the doc
var mySaveDoc = app.trustedFunction(function(oDoc, myPath){
app.beginPriv();
oDoc.saveAs({cPath: myPath, bPromptToOverwrite: false});
oDoc.closeDoc(true);
app.endPriv();
});
The code works fine but not for the temp-files, I get a message of ‚write protection / doc used by onother user‘. But I can navigate to the temp-file in the „Save As“ dialog box and save it manually without any problems.
Please, could you give me advice what I could try?
Thanks, Markus
