Reader and getTemplate
Hi.
I use this script to unhide a template before printing:
this.getTemplate("LIAISON").hidden = false;
this.print({bUI: false, bShrinkToFit: true, nStart: this.numPages-1});
It Works fine in Acrobat Pro but it fails in Reader.
Error message from the JavaScript Console is:
NotAllowedError: Security settings prevent access to this property or method.
Template.hidden:697:Field Bouton 56:Mouse Up
(tested in Reader DC (Mac & Windows), Reader XI (Windows) and Reader 9 (Mac))
But… the JavaScript API reference shows getTemplate as available for Reader, beginning with version 5, there is not any restrictions in the quickbar.
As shown here : Acrobat DC SDK Documentation
Enable menu items JavaScript execution privileges is ticked in Preferences : JavaScript.
Enable global object security policy is unticked in Preferences : JavaScript.
And the document is trusted in Preferences : Security : Enhanced.
So what can I do to unhide this template in Reader ?
Did I mess something?



