I've spent quite a while looking for information on this and come up short:
Apparently there are security settings which interfere with just using the command (I've tried setting my Desktop and a specific PDF on the Desktop to be trusted without success).
Running the command:
app.getPath('user','javascript')
in the console gets the error:
GeneralError: Operation failed.
App.getPath:1:Console undefined:Exec
2
undefined
So I've been unable to determine where to create the "Privileged" (or is it "Priviledged"?) folder.
I simply want to know:
- where does one store the Javascript function so that it will be "trusted:"
- what code goes in that?
- how does one call the code so that one can then use a prompted variable to save a PDF using a name (in this case a number which was used to extract all pages of a PDF which contain said number)
EDIT: turns out the problem was with some copied code not generating a valid path/filename, and Adobe Acrobat reporting its inability to save using the wrong code as a security issue when it wasn't. See the edited post below for complete code to:
- prompt user for text
- search the current pdf for the text and extract each page containing it
- re-save the PDF of extracted pages using the prompted text for the name