Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

How to remove Javascript Warning from dialogs

Avatar

Level 4
I would like a guide/some help on, how to remove the Javascript Warning displayed in javascript dialogs. We will be using the forms internal, so they are trusted - so what do i need (step by step) to do, to make the forms trusted??

I have read something about doing it with a digital signature, but I would like another solution if possible.



Look forward hearing from you all :)

/Thomas Groenbaek
7 Replies

Avatar

Level 4
Thomas,

The solution is to certify the document, and for each user of the document to have the public certificate. This is of course pretty awkward. But since you are in a closed environment you may have another way to do it that is just as awkward.



The warning message isn't displayed if the dialog is executed in a privileged context. This is basically a function you create in a folder level script with the app.trustedFunction() method. Each of your users would have the script on thier system. Depending on your requirement you could put all of the functionality you were going to have in the document into a toolbar button that is on every one's system or just create trusted functions that display the dialogs and return the results to a document script.



Unfortunately creating a trusted dialog is not as simple as creating a trusted function. You also need to use the trused propagator function. Fortunately there is a nice example of doing this in the Acrobat JavaScript Ref in the notes for app.trustPropagatorFunction().



Good Luck,



Thom Parker

WindJack Solutions


www.windjack.com

Avatar

Level 4
Hi Thom



Just the man I was hoping to hear from :) I am already using trustedFunction with mailDoc, save etc. but I will look in to app.trustPropagatorFunction().



Another matter. I attended a pdf LiveCycle conference where Ted Padova mentioned that you were working on a new javascript book - is this true? if yes - will it be just javascript or javascript with Adobe Designer?

I have checked your acrobat references/links on windjack - do you have some advice on how to make scripts in liveCycle designer? good guides, books etc.. I know of the XML FOM, AcroJS.pdf.. are there more?



Thomas Groenbaek

Avatar

Former Community Member
Ditto for me on the second question Thomas asks.

Avatar

Level 4
Hi Guys,

I gave a session at the Washing DC PDF Conference on the differences between AcroForm and XFA (LiveCycle) Scripting. My presentation, which includes a live example with scripts as well as general advice is posted on the
PDF Conference web site. There are several Adobe documents that cover different aspects of the XFA model and scripting. You need both. There are links on the WindJack Solutions site that point to the Adobe web pages where these documents are listed.



For a while now I've been giving developer level Acrobat JavaScript training. I'm currently developing my training content into another format. The is for a book covering the absolute basics of Acrobat Scripting (everything you need to know to do it right). The emphasis is on
Acrobat JavaScript, not necessarily Forms JavaScript. While forms have been a huge part of Acrobat JavaScript, Scripting is massively underutilized for Acrobat Automation and PDF Application development. Especially given the explosion of different PDF scripting technologies i.e., XFA, 3DAnnots, and the lastest browser IAC additions, recent changes in internet interactions (because of security), etc... Lots has been going on in the PDF scripting world including possible future changes because of the MM merger. Can you imagine Flash Action Script integration with Acrobat? Could happen, you never know. Anyway, the idea is to provide a foundation in Acrobat Scripting, and a reference. It will give programmers the tools to effectively use Acrobat and allow them to easily move into any of the other scripting areas.



XFA (LiveCycle Designer) scripting is a pretty big topic all on it's own. It works within the fundamental Acrobat Scripting model, but has several major differences from it. It would be unrealistic to try and cover it completely in a book that's about basic Acrobat JavaScripting, but of course deserves some coverage. Since you're interested, what do you think are the most important aspects of Acrobat scripting that need to be covered and is the dead tree format (DTF) really the best choice? How about an interactive e-book with built in JavaScript examples you can cut and paste into your own PDFs?



Thom Parker

WindJack Solutions


www.windjack.com

Avatar

Level 9
Ditto on both questions.



I'd be more than happy to pay good money for a decent book on Designer/Javascript. How about you and Jimmy Pham collaborate?



Just a suggestion :-)



Howard

Avatar

Former Community Member
Me too - a comprehensive guide really is needed - I'm sure it would become a best seller!

Avatar

Former Community Member
Count me in on this. I would get the company to fork over some dough for a comprehensive book on Scripting for Designer.