Nitro PDF Professional User Guide
Nitro PDF Professional User Guide
Nitro PDF Professional User Guide
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
84<br />
<strong>Nitro</strong> <strong>PDF</strong> <strong>Professional</strong> <strong>User</strong> <strong>Guide</strong><br />
2. On the Form ribbon tab, in the Fields group, click Text Field.<br />
3. Select the text field to edit<br />
4. Right-click and select Properties.<br />
5. Click the Calculate tab.<br />
6. Click the Simplified field notation option, and then click the Edit button.<br />
7. Type the code for your script. In this example, the same calculation for creating sales tax is added.<br />
The code in the JavaScript Editor is written as follows:<br />
subtotal .0725;<br />
8. Click OK.<br />
12.12.7 Using the JavaScript console<br />
You can open the JavaScript Console and write a script that doesn’t belong to any field or element. Scripts<br />
written in the JavaScript Console can be used to test routines and debug code.<br />
To use the JavaScript console:<br />
· On the Form ribbon tab, in the JavaScript group, click Console.<br />
12.12.8 Viewing output and JavaScript errors<br />
You can view output and JavaScript errors via the Output pane.<br />
To open the Output pane:<br />
• On the Home tab, in the Show/Hide group, click Output.<br />
12.12.9 Supported JavaScript Objects<br />
12.12.9.1 App object<br />
A static object that represents the <strong>Nitro</strong> <strong>PDF</strong> <strong>Professional</strong> application.<br />
Contains methods and properties for interfacing with the application as well as some for working with active<br />
documents in <strong>Nitro</strong> Pro.<br />
Example: Gets the number of documents open in <strong>Nitro</strong> Pro and displays it in an alert message.<br />
var nDocs = app.activeDocs.length;<br />
app.alert("You have " + nDocs + " documents open.");<br />
Properties<br />
activeDocs<br />
viewerType<br />
viewerVersion<br />
© 2008 <strong>Nitro</strong> <strong>PDF</strong> Software