5 Replies Latest reply on Jan 25, 2018 3:34 PM by Thom Parker

    Acrobat Dynamic Stamp JavaScript not firing when stamp is first selected


      I am trying to create a dynamic stamp in Adobe Acrobat XI Pro, that I can distribute to other users to use with minimal work on their end to use it. This stamp is an image that I've added a single text field to, and in this field I've inserted the following JavaScript code in Calculate > Custom calculation script:



      console.println("Hello, World!");

      event.value = "";

      if (event) promptUser();


      function promptUser()


      var d = app.response();

      event.value = util.printd("mmm dd yyyy", new Date(Date.parse(d))).toUpperCase();





      When I am in editing mode with this form, and close the built-in JS editor window with this code, I see "Hello, World!" in the JavaScript Debugger window, and I get a prompt to input a date. However, whenever I save this stamp, then add it as a custom stamp, then try to use this, it remains whatever date it was saved as, without a prompt to input a date, and without outputting "Hello, World!" to the JavaScript Debugger window.


      What am I missing to get this stamp to work, so that each time a user selects this stamp to insert it into a PDF, it will prompt them for the date they want to use on the stamp?