2 Replies Latest reply on Mar 6, 2016 10:02 PM by oOmazeOo

    Get E-Mail-Address from DigitalSignature-Information




      i have several SignatureFields in my PDF (every field marked as required).


      If everybody who needs to sign this document has signed ... i want to do this:

      • A Button should appear in the PDF ... named "Notify" ... should not be that problem
      • By hitting this "notify"-Button a script should write an email to a specific email (which is not static ... and can change ... depends on the initiator of the PDF)
        • the email-address should come from the digital signature in a specific SignatureField (for example "SignaturInitiatorField")


      Is this possible via JavaScript?

      • The extraction of an email-address from the SignaturField/DigitalSignatur


      And if it is possible ... how can i do this?



        • 1. Re: Get E-Mail-Address from DigitalSignature-Information
          George_Johnson MVP & Adobe Community Professional

          It's possible, but since an email address isn't a required element and may not be included in a digital signature, it might not work in some cases. The Acrobat JavaScript reference includes some code that will get you started. For example, it includes the following code in the documentation for the signatureInfo field method:


          // Get all info

          var f = getField( "Signature1" );


          var s = f.signatureInfo();

          console.println( "Signature Attributes:" );

          for (i in s) console.println( i + " = " + s[i] );


          When executed, this code will print information available in the Signature1 signature field (presumed signed) to the JavaScript console (Ctrl+J). When I execute this code for a signature field that was signed with a self-signed certificate created by Acrobat, it includes my email address in the "name" property as well as the "certificates" property. It would have to be parsed from either of those.

          • 2. Re: Get E-Mail-Address from DigitalSignature-Information
            oOmazeOo Level 1

            Hello George,

            thanks for your hint.


            I did it now like below ...


            var f = getField( "Signature1" );



            var s = f.signatureInfo();

            var f = this.getField("Signature1");

            var Info = f.signatureInfo();

            var certificate = Info.certificates[0];


            console.println("The signers email-address is: " + certificate.subjectDN.e);


            Now i get the email adress.

            The only thing which is/was weird that the objects-name in the certificate is "email".

            • i tried to call it with certificate.subjectDN.email ... which wasnt working
            • than i called it (like in reference described) with "certificate.subjectDN.e"
              • this is working ò.Ó

            Anyway ... thanks a lot.