3 Replies Latest reply on Jun 10, 2015 12:52 PM by Karl Heinz Kremer

    Issues with a Dymanic Stamp.

    JohnnyBQue Level 1

      adobe Pro X

       

      I'm using the code below (which I saw work flawlessly in a video) in a text field box, in an attempt to get the location of the stamp to use in the code at the bottom of the post, but it gives no return data. Now I know where adobe places the stamp files, but shouldn't this code retrieve it for me....The stamp shows up fine but the text box I assigned the code to in the (Custom Calculate script box) doesn't seem to work as mentioned.

       

      I've actually used the file name of the stamp I created (knowing where its located) and placed it in the code at the bottom but the dialog box never pops-up ether.....

       

      event.value = event.source.stampname;

      console.println("Stamp name: " + event.souce.stampname);

       

      Going to use this code to bring up a pop up dialog box once I find the stamp location

       

      var cAsk = "Enter Due Date:" ;

      var cTitle = "Document State for Stamp  ";

      if (event.source.forReal && (event.source.stampName == "XXXXXXXXXXXXXXXX"))   *******this is where I will be placing the file name of the stamp *******

      {

      var cMsg = app.response(cAsk, cTitle);

      cMsg;

      even.value = cMsg;

          event.source.source.info.DocumentState = (Msg;

      }

        • 1. Re: Issues with a Dymanic Stamp.
          Karl Heinz Kremer Adobe Community Professional

          Your code snippet got modified by the system when you pasted it. You may wan tot click on the "Use advanced editor" button at the top of the editor window, and then click on the ">>" button and select "Syntax Highlighting>JavaScript" to make sure that your script gets posted without any modifications.

           

          But, even without seeing your complete script, I may know what's wrong: You do not use the filename for the stampName, you use the stamp's internal name, which you can find by using the page template feature and looking up the page template name. Here you will see something like

           

          #1234567=The stamp name
          

          In this case, your stamp name would be #1234567 - or, you can place your stamp, then select it and execute the following code in the Javascript console:

           

          this.selectedAnnots[0].AP
          

           

          Use the string that you retrieve via either one of these methods as the stamp name.

          • 2. Re: Issues with a Dymanic Stamp.
            JohnnyBQue Level 1

            Thanks KK

            the template feature gave the correct file name will let you know what happens next...

            • 3. Re: Issues with a Dymanic Stamp.
              Karl Heinz Kremer Adobe Community Professional

              Again, this is not a file name, it's the stamp name. There is no rule about the filename, you can name it anything, it can even have more than one stamp in it. The key is that you have a template with a name that follows a certain naming convention ("#InternalStampName=Stamp name that gets displayed").