3 Replies Latest reply on Oct 23, 2017 11:21 AM by teenerb

    Adding Dynamic Stamp to an Action


      I am trying to create an action that will place the standard Acrobat “Approved” dynamic stamp in the same place and same size every time the action is run. I am having a hard time finding the stamp. I have tried using the code below but I'm just not getting a return that gives me the right information to add to the script.



      app.getPath("user", "stamps");  // Show location of custom stamps

      app.getPath("app", "stamps"); // Show location of built-in stamps




      This will need to be shared among several users, so the script needs to pull the stamp from each user’s computer. Is this possible and how can I achieve it.


      Below is exactly what I need, except I need to replace the arrow button with the Approved stamp. It needs to be the dynamic name/date/time Approved stamp.


      Thanks in advance.





         var inch = 72;

         for (var p = 0; p < this.numPages; p++) {

            // Position a rectangle (.5 inch, .5 inch)

            var aRect = this.getPageBox( {nPage: p} );

            aRect[0] += 1.5*inch;           

            aRect[2] = aRect[0]+1*inch;   

            aRect[1] -= .78*inch;

            aRect[3] = aRect[1] - 18;      


            // Now construct a button field with a right arrow from ZapfDingbats

            var f = this.addField("NextPage", "button", p, aRect )

      f.setAction("MouseUp", "this.pageNum++");

            f.delay = true;

            f.borderStyle = border.s;

            f.highlight = "push";

            f.textSize = 0;                 // Auto-sized

            f.textColor = color.blue;

            f.fillColor = color.ltGray;

            f.textFont = font.ZapfD

      f.buttonSetCaption("\341") // A right arrow

            f.delay = false;



      Screen Shot 2017-10-23 at 11.41.25 AM.png