How to Calculate with Form Fields in Revu eXtreme New

Revu eXtreme allows you to 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.

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.

 Creating and Entering Values in Text Boxes

  1. Go to Form > Insert > Text Box
  2. In the Status Bar below the workspace, click 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. Click on it again to turn it off.
  3. Once you have clicked on the Text Box option, your cursor should turn into a crosshair over the workspace. Click and drag to designate the size of your text box.
  4. Continue creating text boxes until you have at least three.
  5. Once your text box is placed, press Esc twice (if you have Reuse enabled; if not, once). The control points will disappear.
  6. Click to enter numeric values in your desired text boxes. 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.

Depending on what type of form you are creating, you may want your text boxes to contain more specific data, such as numbers, percentages, times etc. To change this:

  1. Press Alt+P.
  2. Open the Format section.
  3. Click on the Category: dropdown and select the appropriate value. See the Revu Help for more information.

Set Up the Output Box

  1. Use keyboard shortcut Alt+Q to open the Forms tab. Leave the left panel open.
    By default, your text boxes will be named “TextX.” X represents a number determined by the order the text boxes were placed in. If you like, you can 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.
  2. Click on the text box in the Forms tab that you want to display the calculation output.
  3. Use shortcut Alt+P to open the Properties panel for this text box.
  4. Scroll down to the bottom of the Properties panel, and open the Calculate section (if it’s minimized).
  5. Select a Calculate Property from the dropdown menu 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, click on the Select button, 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 virtually any combination as well. Click on 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 will pull the value entered in that text box and use it in the calculation.

      Make sure that you copy names from the Forms (Alt+Q) tab when writing the text box names.
    • Custom Calculation Field – Click on the Edit button, and the JavaScript Editor window will open. Enter your custom JavaScript in the field.

      Click on Global scripts to select or edit a Global script you already made, or to create a new one. This is the same dialog as the JavaScript button

    See the Forms Help for even more examples of these calculations.

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

More Info


Please note that Forms Help is separate from the Revu Help.
 
Revu Windows Studio Licensing and Registration
Revu Mac Studio Prime Training Videos
Revu iPad Studio Enterprise Updates and Installation
Revu Enterprise Installation    

Related Articles