Skip to main content
Inspiring
September 20, 2018
Question

Extracting any digital signature details from a completed form

  • September 20, 2018
  • 1 reply
  • 8652 views

Once a form is digitally signed, when I export the data, how can I also collect details that the form is signed or who signed it? Is it even possible? The context is exporting (merging into a spreadsheet multiple completed and digitally signed - hopefully - forms.) Thanks for any help. Best, George

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
September 20, 2018

The signature properties, for a form signed with a digital certificate can be acquired with JavaScript.

Each signature field has a "SignatureInfo()" function. Here's the reference entry for it.

Acrobat DC SDK Documentation

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Inspiring
September 28, 2018

Thank you Thom for giving me a lead on this.

I've been experimenting to extract only the Info.name property and place that value into a field, which I understand cannot happen until the form is signed. The signed form would have the field, however I cannot get the saved and signed form to update the field that would hold the name of the signer.

Can you suggest a strategy how to do this?

The reason I'm doing this is to support many signed forms, where the data from all the fields will be merged into a spreadsheet. We'll use the field with the extracted name of the signer to indicate if the form was signed or not and if it was, indicate the name of the signer.

Thank you for any direction you can give!

Best, George

Inspiring
September 29, 2018

Changing a field after signing would not be appropriate, because it would invalidate the signature. You can use JavaScript to get signature information, but treat the file as read only.


Hi Test Screen Name,

Thank you for the reply. This makes perfect sense. My strategy must then be a secondary process, where after collecting a number of completed forms (with digital signatures, hopefully), I run a script that opens each file and extracts the signature data into a CSV file.

This is a stretch for my skills, but I’ll take any help along the way anyone can offer.

1. Create a JS that opens an identified file.

2. With the open file, scan for signature fields (there may be more than 1 - in some cases I am working with 3).

3. Extract the signature info for each field and place it into a variable that becomes comma delimited.

4. Write the variable (collected signature info) into a CSV file.

5. Do steps 1-4 above for multiple files and place all data into single CSV file.

Am I on the right track?

And can anyone lend direction for any of these steps?

Thank you!

Best, George