To write a calculation script
-
Open the PDF in Nitro PDF Pro
-
On the Forms ribbon, in the Form Fields group, click Text Field

- Select the text field to edit
- Right-click and select Properties
- Click the Calculate tab
- Click the Custom calculation script option, and then click the Edit button
- Type the code for your script. In the example below, a simple routine is created to calculate sales tax at a 7.25 % rate. The code used is:
var f = this.getField(subtotal);
event.value = Math.round(f.value * 7.25)/100; - Click OK
Last updated: June 2026