Nitro PDF Professional User Guide
Nitro PDF Professional User Guide
Nitro PDF Professional User Guide
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
© 2008 <strong>Nitro</strong> <strong>PDF</strong> Software<br />
Forms 91<br />
Example: Once a user has entered their email once, store it in a global variable and auto-fill email fields in<br />
the other open documents.<br />
global.userEmail = this.getField("email").value;<br />
Note: The setPersistent and subscribe methods are not currently supported in <strong>Nitro</strong> Pro.<br />
12.12.9.8 indentity object<br />
This object holds information about the current user who is logged onto the machine using <strong>Nitro</strong> <strong>PDF</strong><br />
<strong>Professional</strong>. You can view this information in <strong>Nitro</strong> Pro preferences as well.<br />
Example: This JavaScript gets the login name of the user and stores it in a global variable (called login)<br />
that can be used by any other JavaScript. Because the identity object is only permitted during the console,<br />
menu, application initialization and batch events, this would be ideal to be in a folder level JavaScript file<br />
(.js) that was executed when <strong>Nitro</strong> Pro starts.<br />
global.login = identity.loginName;<br />
Properties<br />
corporation<br />
email<br />
loginName<br />
name<br />
12.12.9.9 Link object<br />
12.12.9.10this object<br />
This object allows you to get and set the properties of a <strong>PDF</strong> link, as well as set a ‘Run a JavaScript’ action.<br />
Properties & Methods<br />
The link object supports all properties and methods included in the Acrobat JavaScript specification.<br />
Is a special keyword used in JavaScript that refers to the current object. For example, when running<br />
JavaScript when a document is open, using the this keyword is the same as using the doc keyword.<br />
Example:<br />
this.getField("fieldname");<br />
would be the same as:<br />
doc.fieldName("fieldname");