When we try to save the document with our Save button then we get an exception in Adobe Reader 7.0.7 (it worked in Adobe Reader 7.0.2)
The document has rights enabled with Adobe LiveCycle Reader Extensions so it should work.
Here's our .js file:
saveForm = app.trustedFunction(function(savepath)
{
app.beginPriv();
var myDoc = event.target;
try {
if (myDoc.saveAs({cPath: savepath, cConvID: "com.adobe.acrobat.pdf", bPromptToOverwrite: false}) == undefined)
{
app.alert({ cMsg:"Successfully saved as " + savepath, nIcon:3});
}
} catch(e) {
app.alert("Error: " + e.extMessage);
}
app.endPriv();
});
And the Save button we use:
try {
if (savepath.rawValue != "")
{
saveForm(savepath.rawValue);
}
} catch(e) {
app.alert(e.extMessage);
}
The error we receive is:
Error: TypeError: Invalid argument type.
and it points to Paramter cPath as the culprit.
We've tried changing the pathname but were unsuccessful. Any help is appreciated.