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.
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
- Go to the Revu Custom Libraries page.
- Under Interactive Stamps, select Submittal Status to start your download.
- Locate submittal-status.zip in your downloads destination, right-click the file, and select Extract All.
- Select Extract.
Import the stamp
- Open and sign into
Revu 21.
- Go to Tools > Stamp > Import StampâŠ
- 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.
- Select your stamp.
For this example, select Submittal_Status.pdf. - Select Open.
The next time you select the Stamp tool, this stamp will appear in the list.
Placing a stamp
- Select Tools > Stamp, and select Submittal_Status from the list of stamps.
- Click within the document canvas where youâd like to place the stamp. You should be prompted to fill out following fields:
- Select a Project from the dropdown.
- Select a status.
- Fill out the text fields.
- Select OK to place the stamp onto the page.
Customizing a Stamp
To make changes to a stamp, open it in Editing Mode:
- 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. - Use Markup Tools to customize the stamp by adding your company name and editing text color, background color, or your company logo.
- 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.
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.
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:
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
- Go to Window > Panels >Â
Forms  (Alt+Q) to open the Forms panel.
- Go to Tools > Form > JavaScript⊠(Ctrl+Shift+J) to open the Global Script dialog.
- 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:
- Select Tools > Stamp, hover the cursor over the desired stamp, and selectÂ
Edit.
- Select theÂ
Forms panel (Alt + Q).
- Select one of the radio buttons in the radio group Status to highlight the radio button in the stamp.
- In the stamp, right-click the selected radio button and select Copy.
- Paste (Ctrl+V) the radio button where youâd like it to appear on the stamp.
- In the Forms panel, double-click the new radio button to rename it. For this example, a radio button was added and renamed âSupport.â
- Go to Tools > Form > JavaScript (Ctrl + Shift +J).
- Select StampCode, then selectÂ
Edit.
- 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" }
- Select OK to exit the JavaScript Editor.
- Select OK to exit the Global JavaScript dialog.
- 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.
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.
Helpful Information
The Interactive Stamp process
In summary, the Interactive Stamp process occurs in this order:
- The stamp is placed.
- The calculation script generates the stamp dialog based on the global script.
- Information is entered into the stamp dialog.
- The stamp is completed with the desired information.
Dropdown lists and ListBox field types
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:
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.
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.
To recreate the Calculation field after deletion, you’ll first need to find and copy the Calculation field from the original template:
- Select Tools > Stamp, then hover the cursor over the desired stamp (Submittal Status for this example) and selectÂ
Edit.
- Right-click the Calculation script and select Copy.
Then add the Calculation field into the broken stamp:
- Select Tools > Stamp, then hover the cursor over the desired stamp and selectÂ
 Edit.
- Go to Tools > Form > Text Box. Place the text box anywhere in the stamp and use the Form Panel to name the field Calculation.
- Right-click the Calculation field and select Properties.
- In Form Field Properties, select Calculate, and use the dropdown to select Custom calculation field.
- Click Edit and paste (Ctrl + V) in the Calculation script for the stamp.
- Save the stamp.
- 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
Â