How to create Dynamic Stamps | Revu 21

Using an older version of Revu?

Applies to:

  • Basics
  • Core
  • Complete

What is a Dynamic Stamp?

All subscription plans allow you to create dynamic stamps (formerly known as interactive stamps) customized for your projects. Stamps are made using JavaScript, and can include buttons, form fields, company logos, dates, and more. Once stamps are in a document, you and your colleagues can interact with them by filling out form fields, checking boxes, and modifying other content relevant to your project.

Submittal Stamp Basic

Interactive Stamps allow you to create forms that can be edited and filled out by anyone. For example, when a user places the Submittal_Status stamp, they’re prompted in Revu to:

  • Choose the project name that the stamp relates to.
  • Check the appropriate status of the PDF being stamped.
  • Fill out pertinent information about the user, specification, date, and submittal number.

Which Revu products work with Interactive Stamps?

While all subscription plans can edit the appearance of an Interactive Stamp, a Complete subscription is required to add form fields, edit form fields, and edit the JavaScript of an Interactive Stamp.

Adding a Stamp to Revu

There are two ways you can create an interactive stamp. One way is to create the stamp from scratch using JavaScript. The other is to start with a stamp template (such as from our Revu Custom Libraries page) and customize it for your project. This article will focus on creating stamps with templates.

Download the template

  1. Go to the Revu Custom Libraries page.
  2. Under Interactive Stamps, select Submittal Status to start your download.
  3. Locate submittal-status.zip in your downloads destination, right-click the file, and select Extract All.
  4. Select Extract.

Import the stamp

  1. Open and sign into Revu 21.
  2. Go to Tools > Stamp > Import Stamp…
  3. Navigate to the folder that contains your stamp.
    For this example, go to your downloads destination and open the folder named submittal-status.

    The folder will contain the following PDFs:

    • Submittal_Status Instructions.pdf includes instructions specific to modifying the Global Script and the Form Fields in that stamp.
    • Submittal_Status.pdf is used for single stamp placement.
    • Submittal_Status_Batch.pdf is used for stamping multiple pages at once.
  1. Select your stamp.
    For this example, select Submittal_Status.pdf.
  2. Select Open.

The next time you select the Stamp tool, this stamp will appear in the list.

Placing a stamp

  1. Select Tools > Stamp, and select Submittal_Status from the list of stamps.
  2. Click within the document canvas where you’d like to place the stamp. You should be prompted to fill out following fields:

Submittal Stamp Form Filled Out

  1. Select a Project from the dropdown.
  2. Select a status.
  3. Fill out the text fields.
  4. Select OK to place the stamp onto the page.

Submittal Stamp Basic Filled Out

The content in the stamp can’t be changed after it has been added to a page.

Customizing a Stamp

Besides the text inside form fields, you can customize any aspect of a stamp in Revu 21 regardless of your subscription plan. In this example, we’re going to customize the Company Name and Company Logo.

To make changes to a stamp, open it in Editing Mode:

  1. Select Tools > Stamp, then hover the cursor over the desired stamp and click Edit on the right.
    For this example, edit the Submittal_Status.pdf stamp.
  2. Use Markup Tools to customize the stamp by adding your company name and editing text color, background color, or your company logo.

Submittal Stamp with Company Logo

To adjust, add, or remove form fields, you must have a Complete subscription.
  1. Once you’ve customized your stamp, select File > Save As and enter a new name for your stamp.

Form field editing and JavaScript

This section focuses on how to make changes to the JavaScript dialog and form fields with little-to-no knowledge of JavaScript. Once a dynamic or interactive stamp is placed on a document:

  • This triggers an action from the “Calculation” field, which generates the Stamp Dialog.
  • The person placing the stamp can then fill out desired details in the JavaScript prompt.

The JavaScript in the stamps from our Extensions page is split into two parts: the StampCode and the Calculation Script. These two terms are important to understand before editing your stamp.

To edit JavaScript, you must have a Complete subscription.

Calculation script

The calculation script is prewritten and should not be changed. It can be found in the Properties of the “Calculation” form field. The calculation script defines the variables that are referenced in the StampCode. Without an advanced understanding of JavaScript, editing the calculation script will likely cause your stamp to fail.

Do not edit or remove the “Calculation” field in the stamp.
Each stamp provided from the Extensions page works with predefined form fields. You can’t add radio groups or other form field types. If needed, though, you can contact Technical Support for more stamp examples.

StampCode

Every stamp has a stored value called the StampCode, which is the back-end code that represents the visual elements in an Interactive Stamp. For example, if you want to add or edit form fields, use the StampCode. The StampCode controls the content displayed in the stamp dialog and interacts directly with the form fields in the stamp.

The following figure illustrates how the StampCode correlates with the form field names:

Submittal Stamp Revise in Code and Stamp

For all stamps available on the Revu Custom Libraries Page, the StampCode is separated into two sections: the first half of the StampCode references all the text fields being used in the stamp, while the second half references a group of radio buttons and a dropdown list.

Editing the StampCode

  1. Go to Window > Panels Forms  (Alt+Q) to open the Forms panel.
  2. Go to Tools > Form > JavaScript… (Ctrl+Shift+J) to open the Global Script dialog.
  3. Ensure that StampCode is highlighted, then select Edit.
    The prebuilt StampCode JavaScript for Submittal Status displays.

You may notice that the values in the StampCode currently reflect the names of each form field used in the stamp. For example, in the Forms panel, the radio button “Revise” is referenced in the stamp code as:

{ value:"Revise", description:"Revise" }

The text field called “CheckedBy” is referenced in the StampCode as:

{ field:"CheckedBy", description:"Checked by:", default:function() { return Collab.user; } }

In both of these examples, the StampCode starts with value: or with field:. Those two terms correlate directly to the names in the form field. If a form field name doesn’t exactly match its StampCode value or field, the JavaScript will fail to execute. For example, if we changed the radio button “Revise” to “Revised” but didn’t update the StampCode to match that term, then the stamp would fail.

After value or field, you’ll find the description, which is what will display after placing the stamp and encountering the JavaScript dialog. For example, the form field “Spec” is referenced as:

{ field:"Spec", description:"Spec #:", default:function() { return ""; } }

To customize the field descriptions that are displayed in the JavaScript dialog, edit the name of the form field in the Forms panel and in the StampCode. The description does not need to match the name of a form field. For example, if we change “Spec #” in the StampCode to “Specification Number,” the dialog will reflect that change.

Editing a radio group

To add a new radio button to an existing radio group:

  1. Select Tools > Stamp, hover the cursor over the desired stamp, and select  Edit.
  2. Select the  Forms panel (Alt + Q).
  3. Select one of the radio buttons in the radio group Status to highlight the radio button in the stamp.
  4. In the stamp, right-click the selected radio button and select Copy.
  5. Paste (Ctrl+V) the radio button where you’d like it to appear on the stamp.
  6. In the Forms panel, double-click the new radio button to rename it. For this example, a radio button was added and renamed “Support.”

Submittal Stamp Support Added

  1. Go to Tools > Form > JavaScript (Ctrl + Shift +J).
  2. Select StampCode, then select  Edit.
  3. Add a new value to the radioGroup:

The new section of code appears below:

{ value:"Approved", description:"Approved" },
{ value:"Revise", description:"Revise" },
{ value:"Rejected", description:"Rejected" },
{ value:"Support", description:"Supported" }

  1. Select OK to exit the JavaScript Editor.
  2. Select OK to exit the Global JavaScript dialog.
  3. Save the stamp and test your changes.

When you add the stamp to a PDF, the Stamp dialog should display the new option created. In this instance, the dialog now includes a fourth radio button called Support.

Submittal Stamp Button Logo Added and Filled Out

If you add a new radio button using the Form tools directly, a second radio group will be created and won’t be a part of the same radio group that already exists. You can change the name of the new radio button to “Status” in Properties (Alt + P), which will add the button into the Status radioGroup.

The submittal status stamp is only intended to operate with one radioGroup. If you attempt to add a second radioGroup, the stamp will no longer function properly.

Helpful Information

The Interactive Stamp process

In summary, the Interactive Stamp process occurs in this order:

  1. The stamp is placed.
  2. The calculation script generates the stamp dialog based on the global script.
  3. Information is entered into the stamp dialog.
  4. The stamp is completed with the desired information.

In multiple stamps provided from the Extensions page, you may notice that a text field is used as a dropdown list or a list box form field. Using an actual list box or dropdown list field type will be incompatible with any of the calculation scripts embedded in Revu stamps.

Here is an example of a text field that displays as a dropdown list in the Stamp Dialog:

Submittal Stamp Dropdown JavaScript

The text field “Project” acts as a dropdown list in the Stamp Dialog. The list of items that will appear in the Stamp Dialog are dependent on the StampCode.

Submittal Stamp Dialog Dropdown

Troubleshooting

JavaScript Dialog doesn’t appear when placing a stamp

The most common issue that occurs with interactive stamps is that the Calculation field was deleted. If the Calculation field is deleted, the JavaScript Dialog won’t appear when the stamp is placed.

Stamp Calculation Field

To recreate the Calculation field after deletion, you’ll first need to find and copy the Calculation field from the original template:

  1. Select Tools > Stamp, then hover the cursor over the desired stamp (Submittal Status for this example) and select  Edit.
  2. Right-click the Calculation script and select Copy.

Then add the Calculation field into the broken stamp:

  1. Select Tools > Stamp, then hover the cursor over the desired stamp and select   Edit.
  2. Go to Tools > Form > Text Box. Place the text box anywhere in the stamp and use the Form Panel to name the field Calculation.

Recreate Calculation Field

  1. Right-click the Calculation field and select Properties.
  2. In Form Field Properties, select Calculate, and use the dropdown to select Custom calculation field.

Calculation Field Manually Re-Added

  1. Click Edit and paste (Ctrl + V) in the Calculation script for the stamp.
  2. Save the stamp.
  3. Select File > New, and place the stamp onto the document to verify that it’s working correctly.

If you encounter any issues with the steps in this article or have questions about dynamic or interactive stamps, send an email to support@bluebeam.com. Please attach the affected stamp to your inquiry and a brief description of the issue.

How-To

Revu 21

Markup

 

Revu 21 allows you to create Interactive Stamps customized for your projects’ needs.

Related Articles