Expand my Community achievements bar.

Trusted Function Privelged File Folder

Avatar

Level 5

This Adobe publication

http://helpx.adobe.com/acrobat/kb/user-javascript-changes-10-1.html

says place the Trusted Function .js file in (for MS Windows 7 & Acrobat X Pro):

Users\(username)\AppData\Roaming\Adobe\Acrobat\Privileged\10.0\JavaScripts.

(disregard spacing issue in JavaScr and ipts. Webpage error no space in file folders.)

or applicably

C:\Users\JohnSmith\AppData\Roaming\Adobe\Acrobat\Privileged\10.0\JavaScripts

(disregard spacing issue in JavaScr and ipts. Webpage error no space in file folders.)

That's all good and clear except I don't have that "Privileged" file. Any suggestions? Should I just create the
"Privileged" folder inside of the "Acrobat Folder"?

Privleged Folder.jpg

12 Replies

Avatar

Level 6

Yes, you have to create it yourself. The alternative is to use the "app" folder (e.g., execute app.getPath("app", "javascript") in the JavaScript console in Acrobat), in which case the scripts will be available for every user on the machine.

Avatar

Level 5

George,

Thanks as always for your help. I created the remaining file folders: Privileged/10.0/JavaScripts

and placed the Trusted Function .js file rename function "myspecialtaskfunction.js there.

However I received an error code in the console.

RaiseError: The file may be read-only, or another user may have it open. Please save the document with a different name or in a different folder.

Doc.saveAs:5:XFA:form1[0]:RAButton[0]:Buttons[0]:EFS[0]:click

===> The file may be read-only, or another user may have it open. Please save the document with a different name or in a different folder.

     All of this scripting and file save as a field name works on my computer. However I need a co-worker to be able to use this Trusted Function too. Back to the drawing board.

     The console says the file may be read-only or open elsewhere. I am not sure if it is a read only file, although the file is a "Reader Enabled" file. I am sure the file is not open elsewhere though. Thanks.

Avatar

Level 6

Hmmm...so you're trying this on Reader, correct? As a test, try temporarily disabling protected mode and see if it makes a difference. If it does, you should be able to make it work by making a registry edit. Let me know how it goes.

Avatar

Level 6

Also, is the file on the user's local system or on some sort of network share?

Avatar

Level 6

And finally, are you able to do a manual Save As? Is there any chance the path the script is using is incorrect?

Avatar

Level 5

The file is on a server, I assume the path is correct since the same script works on my computer (script is saving the reader file by a name from a certain field on the pdf to a specified server location) and the script file (myspecialtaskfucntion.js) was just attached in a email to a co-worker and then loaded into the location on their computer at:

C:\Users\JohnSmith\AppData\Roaming\Adobe\Acrobat\Privileged\10.0\JavaScripts

I'll try a manual save, unprotected mode and report back. Thanks for your time.

Update:

I don't believe I can put Acrobat X or Acrobat X Pro into unprotected mode. Perhaps this mode is only for Adobe Reader X ? The computer I'm having trouble with is MS Windows 7 with Acrobat X (aka Acrobat X Standard). There is no option for placing the Acrobat Application into "Unprotected Mode" that I can find.

General Tab Settings.JPG

The manual save is possible on the co-workers computer after the console appears with the previous message I posted above.

"RaiseError: ....................................... or in a different folder."

Avatar

Level 6

I'm sorry, I thought you were trying this with Reader.

It's probably has something to do with the fact that the file is on the network. It would be interesting to so what happens with a manual Save As. I seem to recall someting about an error message like that being reported before, but I'd have to do a bit of searching to find out more...

Edit: Sorry, I missed your note about doing a Save As manually.

Avatar

Level 6

Another thing to try: Close any Windows Explorer windows you may have open and try opening the file through Acrobat (e.g., File > Open...). Any difference?

Avatar

Level 5

The way the file is opened, is from a link in an email message. After clicking on the link, Adobe Acrobat opens the document up from the server. So it is never opened in IE or Firefox. I created buttons on the form that save your changes via the trust function and then opens up a pre-populated email message with the hyperlinks in the document.

I'll try your idea in #9.

Another thing to try: Close any Windows Explorer windows you may have open and try opening the file through Acrobat (e.g., File > Open...). Any difference?

Thank you.

Avatar

Level 5

George,

I solved this problem back in the begining part of the year. Now the same problem has reared it's ugly head again. Trying to remember how we solved this problem earlier. I'll report when I figure it out.

Here is the console message.

Acrobat EScript Built-in Functions Version 10.0 Acrobat SOAP 10.0

RaiseError: The file may be read-only, or another user may have it open. Please save the document with a different name or in a different folder. Doc.saveAs:6:XFA:form1[0]:Letter[0]:Content[0]:caSignaturesubform[0]:caSignature[0]:postSign ===> The file may be read-only, or another user may have it open. Please save the document with a different name or in a different folder.

Avatar

Level 5

Problem resolved. The file path for the destination of the pdf on the server had been moved thus making the path in the pdf inaccurate. Phew!