Skip navigation
Currently Being Moderated

Looking for xfa.signature.sign/verify example with all parameters used

Jul 15, 2011 12:17 PM

Hello all,


I'm trying to extract information from a data signature to copy into another field.


I can access the data signatures in the document through the enumerate method:
var oSigs = xfa.signature.enumerate();
var iNum = oSigs.length;

for (var i=0; i < iNum; i++)
     var oChild = oSigs.item(i);

    // Display dialog box.
     var iVerify = xfa.signature.verify(oChild,"1");"Validity of signature integer value: " +


What I'd really like to do is specify an output SignatureInfo object in the "sign" operation so that I can extract the common name of the signer, date, certificate, etc.... through the signatureInfo() method.


Syntax is:

Reference_Syntax.sign( OBJECT param1, STRING param2, STRING param3 [, STRING param4 [, BOOLEAN param5 [, OBJECT param6 [, OBJECT
param7 ] ] ] ] )  where param7 "Represents an output SignatureInfo object containing the writable properties of the signature."

(From ..)


I have not found an example that includes any of the optional parameters.


Can anyone help with this?


  • Currently Being Moderated
    Jul 19, 2011 12:45 PM   in reply to emfahmy



    I have created a simple sample that shows how to get the signatureInfo object (using JavaScript on an XFA based PDF form)


    Sample script is as follows...


    // Get particular info
        var Info ="form1[0].Page1[0].SignatureField1[0]").signatu reInfo()
        // Some standard signatureInfo properties
        app.alert("name = " +;
        app.alert("reason = " + Info.reason);
        app.alert("date = " +;
        // Get the certificate; first (and only) one
        var certificate = Info.certificates[0];  


        // Common name of the signer
        app.alert("Signer Common Name = " +  certificate.subjectCN);  


    I have also attached the sample file.


    Hope this helps.


    Mark as:
  • Currently Being Moderated
    Jul 20, 2011 11:15 AM   in reply to emfahmy

    I'm continuing to investigate... hopefully I'll have something soon.




    Mark as:
  • Currently Being Moderated
    Jul 25, 2011 11:44 AM   in reply to emfahmy

    I am waiting on confirmation, but it appears that the ability to create a SignatureInfo object (for an XML data signature) when using the "sign" method with the optional parameter is broken.




    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points