Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Checking to see if a document has a digital signature

Avatar

Former Community Member
Hello,



I have created a stand alone static PDF document using the Designer 7.0.

I have some code that checks the document to ensure the proper data fields have been filled out before the user can sign the form. After signing the form the, the user is supposed to click a submit button where 2 things happen, first the data is sent for processing (do not the the digital signature info here) and second a copy of the PDF is save for archiving purposes (with digital signature).



What I need to know is how do I verify the digital signature field is not null or empty?



If I check its raw value, before and after are the same (null or empty even thought I can see that the form has been signed by looking at the screen). If I used the signatureInfo functions available in professional, I get a security violation error. The form is filled out using Adobe Reader and the forms have digital signature right added via the Reader Extensions v6.0.



Any help is greatly appreciated.



Thanks



Ben
4 Replies

Avatar

Former Community Member
Hi Ben, First advice is upgrade to designer 7.1. There are major improvements in the stability of designer. 7.0 kept crashing on me constantly.



I created a little function which should help you out.



function isSigned(sigField){



var oState = event.target.getField(sigField).signatureInfo().status;



/* if (oState == -1)

//app.alert("Not a signturefield");

else if (oState == 0)

//app.alert("Signature is Blank");

else if (oState == 1)

//app.alert("Unknown Status");

else if (oState == 2)

//app.alert("Signature is invalid");

else if (oState == 3)

//app.alert("Sig of Document is valid, identity of signer could not be verified");

else if (oState == 4)

//app.alert("Sig of Document is valid, identity of signer is valid");

else

//app.alert("Value was " + oState); */



return oState;

}



You need to pass this function the fully qualified SOM so if the signature field is in form.subform.page1.sigField you would call it like this isSigned("form[0].subform[0].page1[0].sigField[0]").



Good luck.

Avatar

Former Community Member
Thanks Charles, That seemed to do the trick. It seems there are some serious inconsistancies between Professional and Designer. Yeah, I am tring to get 7.1, it seems 7.0 crashed on me at random times too.



Thanks again



Ben

Avatar

Former Community Member
I have tried this to NO avail. I am absolutely lost and a rookie at this. Can someone break this down a little bit for me? Which object does this script go in? Which event do I select in the object to trigger the script?

Avatar

Former Community Member

Does anybody know the answer to this now.  I know this is an old post, but I could not get the script that is provided to work.  I'm using Live Cycle 8.0 if that makes any difference.