Copy link to clipboard
Copied
I am updating a traditionally printed form to be able to be signed electronically. The form should be fully functioning as a printed empty form that can be completed by hand.
I am using Acrobat Pro DC with company-issued digital certificate based signatures.
Consider: I have a training record that has a person's name, department and line for them to sign. This works well for printed records that need to be scanned and stored - nobody likes this but it is necessary to document training at the workplace with people that do not need a computer on the job.
I also have many people that are working from home, these people need training as well on different topics and we are required to maintain the records.
I want to do is:
When a user signs with a certificate, I want a field to be populated on the form that includes their name (common or distinguished) and their department as present in their certificate.
Please don't tell me that it is all visible in their signature, I know that already. Some people have their certificate appearance very plain, easy to read, and some people have it filled with everything, making the text very small.
Next, if possible, I would like to empty the form field upon "unsigning" the document.
This is really two requests in one. Please help!
Copy link to clipboard
Copied
Users need to be trained NEVER to look at document signatures. It is a terrible pity that they even exist. Users MUST be trained to check the signature's actual properties. The on screen stuff could be faked in seconds. But the info you want is already shown in the signature info panel and always comes from the signature. (Whether it proves identity depends on how certificates are assigned; self sign certificates don't prove identity; I could make one in seconds with your name, if I knew it!)
Copy link to clipboard
Copied
Thanks, I have already configured a certificate authority server and issue each certificate to individuals. I do allow them to change their appearance to what is appropriate.
Copy link to clipboard
Copied
Yes, it's possible to do it. Here's how:
As the custom calculation script of the text field enter the following code:
var f = this.getField("Signature1");
if (f.valueAsString=="") event.value = "";
else event.value = f.signatureInfo().name;
And as the Signed script of the signature field enter:
this.calculateNow();
Copy link to clipboard
Copied
Thank you so much for your sample. I typed it in exactly and I got the following message in the debugger console.
Exception in line 3 of function top_level, script AcroForm:Name1:Calculate
InvalidSetError: Set not possible, invalid or unknown.
Event.value:3:AcroForm:Name1:Calculate
-- It did put my e-mail address into the field though. Is it possible to get just the name of the user - portion of the distinguished name?
Copy link to clipboard
Copied
To be specific - the field did put my Name followed by my e-mail address. would it be possible to query the certificate to get the common name "cn" and also the "ou" ?
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more