8 Replies Latest reply on Apr 7, 2014 8:48 AM by BillySweeney

    Dynamic date in Digital Signature


      I am looking for a method to add a custom dynamic date field in a digital signature or modify the location and format of the Date field that is already included in the Digital ID Appearance.  We are not interested in using a dynamic stamp, if we can avoid it.  We are interested in the extra layer of security that the "Sign & Certify" process provides.


      We have a signature box on a Construction Title Sheet that has the Date field below the Signature field and I have the custom image created and would like to add a dynamic date that is applied when I sign the document.  I tried a javascript in the same method that you would use in a dynamic stamp but it is not working. 


      Can anyone lend some assistance?


      Thanks in advance!

      Billy Sweeney

      Delaware DOT

        • 1. Re: Dynamic date in Digital Signature
          George_Johnson MVP & Adobe Community Professional

          If you add a separate date field, you can use a script in the Mouse Down event of the signature field to populate it just before the signature is applied. The script could be something like:


          // Mouse Down script for signature field

          getField("DATE_SIGNED").value = util.printd("mm/dd/yyyy", new Date());



          Replace "DATE_SIGNED" with the actual name of the date field. The field value will remain set at this date if the user chooses not to go ahead with signing the signature field, which may not be a problem. Using the Signed event of the signature field will result in the date value being set after the signature is applied, which probably isn't what you want.

          • 2. Re: Dynamic date in Digital Signature
            BillySweeney Level 1

            Yea, I don't think that would really work for me unfortunately.  It's an interesting workaround that gives me something to think about though. 


            Instead of trying to create a dynamic date field in the digital signature, you are saying to create a date field on the date line of the sheets signature block that populates on a mouse down event inside of the PDF.  The only problem I have is, our title sheets have the potential of having 12 signatures on them (for a worst case scenario)...


            If there were a way to say if the field was within that square you have to draw for the Digital Signature during the Sign & Certify process, that would work great.  Looks like I need to take a look at all of the Jscript commands adobe allows..  Even then, it would mean that our engineers/designers would have to place the field and know the exact jscript commands on each and every title sheet they create.  Probably going to be pretty cumbersome and not something they would be interested in doing...


            Thanks though for the suggestion, I am going to put it on my list of talking points when we get into our planning meeting for implementing electronic signing.

            • 3. Re: Dynamic date in Digital Signature
              George_Johnson MVP & Adobe Community Professional

              What I was suggesting would only make sense if you were to add blank signature fields to a document, with the intention of having them signed after distributing the document. The script would trigger when the digital signature field is clicked, causing the corresponding date field to populate with the current date. You could add the time as well.


              If you're looking for a solution for signatures that are added ad hoc, or for a certification signature (which is not the same as an "approval" signature) , I don't think there's much you can do. In your description, it sounded like you were adding blank (approval) signatures to the document. Is that not the case?

              • 4. Re: Dynamic date in Digital Signature
                BillySweeney Level 1

                No, I am not adding blank signature fields to a PDF.  Well..  at least, that wasn't what I was intending when I posed the question. 


                I have a PDF that is created using a piece of CADD software that is the Title Sheet to a set of plans.   Right now, all of the information on that title sheet is filled out using the CADD software.  Project title, contract number, milepoint limits, table of contents, Federal Aid number, an image showing a general location of the project on a map, etc... Once that PDF is created, we want to be able to distribute it to up to 12 people for Digital Signatures.  Not knowing the exact difference between a Certifying Signature and Approval Signature, we want to be able to use the Sign & Certify process, NOT the Custom Stamp. 


                I was hoping there would not be a need for the designers/engineers to have to manually add the Date and Signature fields for each of the 12 blocks for every title sheet they create (some might have to create up to 8 or 10 different title sheets with differing information a month).


                The other route we could go would be a drastic change to how we create the Title Sheets.  We would almost have to turn it into a form and enter the information on the title sheet in Adobe as opposed to using our CADD program to complete the information.  The "background" image would be the title sheet with a whole bunch of fields that need to be filled out, along with image fields and signature fields that automatically fill specific date fields, similar to another post I was reading earlier today. That change in business practice would be hard to force these people to accept, I'm afraid.


                So, what I was hoping for was to use the Sign & Certify > Place Signature process and have them place a custom signature file using their Digital ID and have that file contain a dynamic date field that is automatically populated similar to how a dynamic stamp in the Commenting tools work.


                It doesn't seem like that is possible though, unfortunately.


                By the way, I really appreciate the time you are taking to help me through this.

                • 5. Re: Dynamic date in Digital Signature
                  George_Johnson MVP & Adobe Community Professional

                  I think I understand now. Out of curiousity, what's your objection to the default timestamp format?


                  It would be possible to automate the process of adding the blank signature and date fields. Each person who needs to do this would just need a custom JavaScript file installed on their machine and the code to add the fields could be triggered by a custom menu item or toolbar button. So your title sheets could be created as they are now, and a single click could add the signature/date fields to it. Post again if you'd like more information on this approach.

                  • 6. Re: Dynamic date in Digital Signature
                    BillySweeney Level 1

                    The date "field" on the default Digital ID stamp is just in the wrong location in the signature for us and includes the time and the number of hours difference from GMT.  I couldn't find any information about changing that, although to be honest I never really looked terribly hard.


                    If you could point me to a resource that would show me how to automate the placement of the siganture and date fields that might actually be exactly what I need.

                    • 7. Re: Dynamic date in Digital Signature
                      George_Johnson MVP & Adobe Community Professional

                      Here's a link to the documentation for the doc.addField method:http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_A croJS.88.435.html


                      You'd use it for both the signature fields and the text fields used for the dates. You'll need to use the field.setAction to add the JavaScript that populates the date field in the Mouse Down event of the signature field: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.750.html


                      You can create a custom toolbar button using the app.addToolButton method:http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_A croJS.88.134.html


                      Here's a link to a tutorial that might help with the coding: http://acrobatusers.com/tutorials/js_add_buttons_to_pdf

                      • 8. Re: Dynamic date in Digital Signature
                        BillySweeney Level 1

                        That information was very helpful.  I at least have a path forward that I think I can get everyone on board with.... 


                        THanks again for all of your help, I think this will work nicely if we decide to go the route of digital signatures.