These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Privileged Javascript

tgoodman
Registered: Aug 18 2008
Posts: 72

Hi There,

I have a customer who wants a PDF with embedded privileged javascript. (nothing too scary - just the ability to save a copy of the document to a network folder using the document saveAs functions)

I can certify the document, and if a user trusts the certificate, the code executes ... great!

But ... what happens when the document is opened by a new user ... they need to know to trust the certificate (a complex process). I would like to test that they trust and, if not then display some help info on how to trust the certificate ....

Is that something I can check in javascript, and display some help info?

Thanks

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Privilege means that the user has explicitly allowed a script to do potentially dangerous things. There are only two ways for the user to do this.

1. Have a digital signature on there system (you've already got this one)
2. Have the privileged code in a folder level trustedFunction that the document can call.

Method #2 is way more reliable since many document actions can de-certify a PDF.

Your best best is to have the user download and install a Folder Level JavaScript file.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

tgoodman
Registered: Aug 18 2008
Posts: 72
Thanks Thom.

I advised the customer this was the best solution, and they were happy with that.