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");
xfa.host.messageBox("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.
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."
I have not found an example that includes any of the optional parameters.
Can anyone help with this?
Sample script is as follows...
// Get particular info
var Info = event.target.getField("form1.Page1.SignatureField1").signatu reInfo()
// Some standard signatureInfo properties
app.alert("name = " + Info.name);
app.alert("reason = " + Info.reason);
app.alert("date = " + Info.date);
// Get the certificate; first (and only) one
var certificate = Info.certificates;
// Common name of the signer
app.alert("Signer Common Name = " + certificate.subjectCN);
I have also attached the sample file.
Hope this helps.
Thanks Steve but unfortunately my problem is still unresolved.
I'm trying to extract signature information from a data signature present in the document.
The reason I'm not using a signature field for signing is because the user is then prompted to save the file (locally). I need to replicate the behavior of signing a form in LC ES2 Workspace.
For this reason then, signing is implemented by a regular button, labelled "Sign & Submit", which triggers the click event of a "Submit" button (with sign submission) turned on.
When one opens the signed PDF, the data signatures are visible by opening Reader's Signature Panel, however no signature-like object appears in the body of the document.
xfa.signature.verify has a 4th parameter that, according to the documentation is "an output signatureInfo object containing the writable properties of the signature". http://help.adobe.com/en_US/livecycle/9.0/designerHelp/000976.html#105 8250
If I can properly specify param4 thereby creating a corresponding signatureInfo object on the fly, then I can use the signatureInfo methods you referenced in your code sample.
Is this the correct approach? I do not have access to the LC Digital Signatures component.
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.