6 Replies Latest reply on Mar 18, 2015 3:33 PM by brucew38394680

    Dynamic Stamp Jave Script For Date And Time

    CaptainChuckles

      Hi.

       

      The date and time have stopped appearing after my name when I insert a dynamic stamp into a PDF document.

      I have edited the java script as instructed elsewhere on this site but this has made no difference.

      Also when I select dynamic stamps I have two copies of each stamp in the drop down menu!

      Iam using Adobe Acrobat 9 Pro on Windows 7 Profesional.

      Please help.

      Thanks.

      Norman

        • 1. Re: Dynamic Stamp Jave Script For Date And Time
          DimitriM Level 3

          Hi CaptainChuckles,

           

          The problem is likely due to the fact you have two of the same stamp files installed and they are over-running each other.  Delete one of the duplicated stamp files and see if that clears up the problem ( you can look at the create date/time to see which one is the older file and which is the new one you created).

           

          Hope this helps,

           

          Dimitri

          WindJack Solutions

          www.pdfscripting.com

          www.windjack.com

          • 2. Re: Dynamic Stamp Jave Script For Date And Time
            CaptainChuckles Level 1

            Thanks for this.

            The date now appears but my name does not.

            I understand that Adobe is supposed to use the log in name and insert in dynamic stamps to show who has reviewed or approved a document etc.

            How do I get my name to appear in the dynamic stamps.

            Thanks

            Norman.

            • 3. Re: Dynamic Stamp Jave Script For Date And Time
              gkaiseril MVP & Adobe Community Professional

              First, in Acrobat or Reader goto the application Preferences, Edit => Preferences, and click on the "Identity" category. Now complete the requested information and click "OK".

               

              Now your dynamic stamps should show your name as entered into the Identity for your computer. This should be done by each user on each system the user uses. Without the Name field being completed, Acrobat or Reader will use the login name or the collaboration user ID.

               

              When scripting if you want to access the user name or other values of the Identity object you will need to install a special application level script into a specific location on each machine. This location can vary by version of Acrobat or Reader.

              • 4. Re: Dynamic Stamp Jave Script For Date And Time
                CaptainChuckles Level 1

                Hi.

                I have completed the "identity" but my still does not appear in any of the dynamic stamps.

                 

                Thanks

                • 5. Re: Dynamic Stamp Jave Script For Date And Time
                  gkaiseril MVP & Adobe Community Professional

                  Any errors in the Acrobat JavaScript Console?

                   

                  What code are you using to add the user name?

                  How are you going to handle a missing user name?

                   

                  From one of the Adobe supplied stamps, the code to inset the user name and date:

                   

                  event.value = (new Date()).toString();

                  AFDate_FormatEx("h:MM tt, mmm dd, yyyy");

                  event.value = "By " + ((!identity.name || identity.loginName != (event.source.source || this).Collab.user) ? (event.source.source || this).Collab.user : identity.name)

                  + " at " + event.value;

                   

                   

                  The code that reads:

                   

                  ((!identity.name || identity.loginName != (event.source.source || this).Collab.user) ? (event.source.source || this).Collab.user : identity.name)

                   

                  determines if the identity.name is blank and if so then uses the Collab.user name and if the identity name is not blank, then the identity.name is used.

                  • 6. Re: Dynamic Stamp Jave Script For Date And Time
                    brucew38394680

                    I have a dynamic stamp created and works on my computer. It is a "Reviewed" stamp with date and time. However, I copy the file into same location on the other computer. It shows some extra time information like (UT GMT time day time light saving ...) bah bah ... I don't need those

                     

                    why the same file but stamp is displayed different

                     

                    Please help how to fix.

                     

                    Script used is exactly like this:

                     

                    event.value = (new Date()).toString();

                    AFDate_FormatEx("h:MM tt, mmm dd, yyyy");

                    event.value = "By " + ((!identity.name || identity.loginName != (event.source.source || this).Collab.user) ? (event.source.source || this).Collab.user : identity.name)

                    + " at " + event.value;