This article details advanced functions of Dynamic Stamps and Requires Advanced knowledge of JavaScript, as well as familiarity with the Adobe JS API Reference manual. If you are looking for basic Dynamic Stamp creation instructions please see KB277.
PDF XChange Support may be unable to assist you with the advanced JS involved here, as such any JS questions are best directed to our Forums.
As with creating Dynamic Stamps, these actions require a valid PDF-XChange Editor Plus or PDF-XChange PRO license to be performed.
This KB article will assume that you have knowledge of how to create Stamps, Dynamic Stamps, and advanced knowledge of the Javascript language.
If you need to review these aspects, please re-read these articles:
With this information, you are able to create a stamp and add in Dynamic elements, the purpose of this article is to supplement the steps involved in creating custom operations, dialogs, and adding user input to these dynamic stamps. Some examples of where this could be useful:
Ensure you have read the Review section before beginning this proces.
This example will use the Manually Entered Date JS example in the txt file above.
Once you have a dynamic stamp created, and the JavaScript required in mind, the process is fairly simple.
1. Open the Stamp PDF file and select the field for which you wish to view a dialog box for additional input, then open the Properties pane (Ctrl+`):
2. Within the Properties pane, scroll down to the Value Calculation section, and select Custom Action then click the ellipses icon beside Run a JavaScript.
The Edit Action: "Run a JavaScript" window will open, and will be blank.
3. Enter your desired JavaScript (as per the example):
4. After finishing this, applying the JS, and saving the document, you can then test placing the stamp
If you cannot save the document because it is "In use" by the Editor, this is likely because you are directly editing the document from within the dynamic stamps folder:
5. Upon placing the example stamp a "Specify Date" dialog opens, to ask for user input prior to placing the stamp:
Your Stamp should work similarly when it is complete. You can download the sample stamp file for reference here.
If you have further questions please consult the Adobe JS API Reference first, then post directly to the forums with your current sample script and a description of your troubles.
You can contact us by phone, email or our social media accounts — we are here to assist you.