Creating a Dynamic PDF Stamp
Dynamic PDF Stamps are special PDF Documents containing JavaScript code that will either prompt the user for additional information or dynamically generate additional details on the stamp such as current date and time.
How to Create a Dynamic PDF Stamp
- Open an existing PDF Stamp template
- Alternatively you can also Create a Blank PDF and choose the dimensions for your new stamp
- Start Form Editing Mode and create a text field where you would like the dynamic text to be displayed on the stamp
- Using the Object Selection Tool, select the Field
- Access the field properties by right clicking (Mac: Ctrl + Click) on the field and choose Properties in the mouse menu
- In the Properties window select the Calculate tab
- Choose the This field has a custom calculation option and enter the JavaScript code to generate the dynamic data for the stamp. Once you have completed setting your calculations click on OK
- Repeat steps 2- 5 to create as many fields with dynamic calculations as you need.
- Once all calculations are complete save the document
- Follow the instructions to Create a PDF Stamp using the PDF document you just created above
- Your dynamic stamp is now ready to use
Sample Dynamic JavaScript Calculations
Below are some JavaScript code samples showing how to create a dynamic stamp data.
Prompt for User Name
var cAsk = "Please enter a name";
var cTitle = "Document State For Stamp";
var cMsg = app.response(cAsk, cTitle);
event.value = cMsg;
Display Current Date & Time
event.value = util.printd("h:MM tt, mmm dd yyyy", new Date);