Automate calculations with form fields in Revu

Applies to:

  • Revu 21
  • Revu 20

In Revu, you can use Form Fields to automatically calculate values entered into a PDF form, similar to Microsoft Excel. You can calculate everything from salaries to prices for building materials.

If you’re using Revu 20 or below, you must have Revu eXtreme to create and customize PDF forms.

To get started, you’ll need to create at least three text boxes. Any number of text boxes may contain values to be calculated, while at least one of the text boxes will display the result of the calculation.

Create and enter values in text boxes

  1. Open the Forms panel: Window > Panels > Forms (Alt+Q)
  2. Go to Tools > Reuse. This allows you to place the same markup as many times as you need to. If active, the text will be highlighted in blue. Select it again to turn it off.
  3. Select the Text Box tool. Your cursor turns into a crosshair over the workspace.
  4. Drag to designate the size of your text box. Continue creating text boxes until you have at least three.
  5. Once the text boxes are placed, press Esc two times. The control points disappear.
  6. Select the text boxes to enter numeric values. Leave at least one box empty; this will be your output box.
As long as the text and numbers are grouped together, Revu will ignore the text and calculate the numeric values only. In other words, strings like “Text123″or “123Text” work well; but strings like “1T2e3xt” or “123Text123” behave in unexpected ways.

Change your values’ categories

  1. Select a text box from the Forms panel.
  2. Open the Properties panel (Alt+P).
  3. Open the Format section.
  4. From the Category: dropdown list, select the appropriate value.

Set up the output box

  1. Open the  Forms (Alt+Q) panel.
  2. By default, your text boxes will be named “TextX.” X represents a number determined by the order the text boxes were placed in. Double-click on the entries here to rename them. Keep in mind that text boxes with the same name will synchronize their changes (i.e. whatever is changed in one is also changed in the other).
  3. Select the text box in the Forms panel that you want to display the calculation output.
  4. Open the Properties (Alt+P) panel for this text box.
  5. Scroll down to the bottom of the Properties panel, and open the Calculate section (if it’s minimized).
  6. Select a Calculate Property from the dropdown list based on the type of calculation you would like to perform:
    • Value is not calculated – The default option. Calculation results will not be displayed in the text field. In most cases, every text box except your output box should be set to this property.
    • Calculation field – Displays either a sum, product, average, minimum, or maximum of specific values in the selected text box. To specify which values are calculated, select Select, then select the box that you would like to calculate with from the next dialog box.
    • Simplified field notation – Displays the result of any combination of addition (+), subtraction (–), multiplication (*) and division (/). Parentheses ( ) may be used in any combination as well. Select Edit to enter your equation.
      Revu can calculate somewhat complex combinations of parentheses, such as: ( ( (Text1+1+1)+2 ) * (Text2+4) ) / 5

      You can enter both numbers and text field names in your calculation. If a text field name is entered, Revu pulls the value entered in that text box and uses it in the calculation.

      Copy names from the Forms(Alt+Q) panel when writing the text box names.
    • Custom Calculation Field – Select Edit, and the JavaScript Editor window will open. Enter your custom JavaScript in the field. Select Global scripts to select or edit a Global script you already made, or create a new one.
    For more examples of form calculation fields, see the Revu Help Guide.

Once you select a calculation option, the result displays in your calculation output field.

How-To

Revu 21

Revu 20

Revu Standard

Revu lets you use Form Fields to automatically calculate values entered into a PDF form. Follow these steps to get started.