2 Replies Latest reply on Nov 25, 2009 2:12 PM by Joel Geraci

    Auto run flatten pages after a stamp

    Ian MR-LmXtn6

      I have created a Dynamic Stamp. The user then stamps the page and perhaps drags and resizes as necessary. After they have finished that, I want to run this JavaScript “this.flattenPages(this.pageNum)”, so that the page the stamp is on gets flattened and thus guaranteeing that when the page is printed the Stamp will be printed even if the user has not selected “Document and Stamps” from the Print dialog box. So how do I get that JavaScript to run automatically after the user has finished placing the stamp.

        • 1. Re: Auto run flatten pages after a stamp
          Patrick Leckey Level 3

          The problem here is that you want the user to be able to resize / alter the stamp after it has been placed.  There is no way for Acrobat to know when the user is done modifying the stamp (for example if they resize it once, what is to say they won't want to resize it again before it is printed?).  This method would require some sort of user interaction so they could tell Acrobat they are done and the page is ready to be flattened.

           

          Do you control the PDF files that will get stamped, or would it be any random document?  If you control the documents, you could have a JavaScript that would trap the WillPrint event, scan the document for any annotations with a subtype "Stamp" and then flatten those pages before printing.

          • 2. Re: Auto run flatten pages after a stamp
            Joel Geraci

            You could add a function that runs at a given interval (say every 2 seconds) to the page open action looking for your stamp and then flatten the page if it's on there.

             

            J-

            1 person found this helpful