Rename the PDF and email with script of Adobe reader 9

Hello

I want to be able to rename a specific PDF file and then provide the user email PDF as an attachment option

Problem is does ' t work in Adobe Reader 9, even with menu enable Javascript execution privileges points

On the other hand, it works with Adobe Acrobat 8 Professional.

The debugger raises this error when running in Adobe Reader 9


RaiseError: This operation is not allowed.
Doc.saveAs:16:Menu send the Document to FCL customer: Exec
= > This operation is not allowed.

I understand that Adobe Reader cannot save changes to the document content, however I don't change the content here, just rename the document.

in adobe reader it is an option to save a copy, is at - it an equivalent to this javascript command.

or other options to achieve this?

Thank you

app.addMenuItem({)
cExec: 'SendDoc();',
cParent: "change."
cName: "send the Document.
});


function SendDoc() {}

var dialogTitle = "enter number";
var defaultAnswer = "";
var response = app.response ("Please enter the 6digit number",
dialogTitle, defaultAnswer);

var myPath = "~ ~" + response + "~ ~" "Report_" + response + ".pdf";
this.saveAs (myPath);


this.mailDoc (true, "[email protected]", "cc [email protected]", "", myPath);


return;

Yes, I see what you mean... Try this:

Between commands save as and mailDoc, add these lines:

myDoc.closeDoc (true);
myDoc = app.openDoc (myPath);

Tags: Acrobat

Similar Questions

Maybe you are looking for