Back to Articles List

Advanced Dynamic Stamp Creation

Disclaimer

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.

Tracker-Software 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.

Review

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:

  • Manually entered Dates (.txt Example here)
  • Drop down selections
  • "More info" text boxes

Process

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:

  1. Save As... the document to your Desktop, then Close the Editor (do not change the file name)
  2. Open the dynamic stamps directory located at ( %appdata%\Tracker Software\PDFXEditor\3.0\Stamps )
  3. Move the new stamp from the desktop into this folder and Overwrite the old version.
  4. Reopen the Editor and the new stamp should have taken the old stamps place.

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.

Was this article helpful?
Yes No Somewhat