ColdFusion: Find out who digitally signed a PDF

372 views Asked by At

I am building a basic workflow in ColdFusion 2016 where the user has to collect signatures/approval for a project.

For various reasons, the user wants to be able to send out a PDF and collect back the digitally signed file for upload.

I am probably overthinking the process, but I am wanting to check the returned document against the internal record of who was supposed to be signing the document (it would also make it easier on the end-user since I can automatically mark the signature as received).

Using CFPDF I can validate that the document is signed and that the signature is valid, but I would like to be able to extract who signed it if possible (to test that the person who signed it was the person who was supposed to sign for it).

Any ideas??

1

There are 1 answers

0
Miguel-F On

You have not shared any code so I have no idea what you have tried but according to the documentation ColdFusion 11 added support for reading signatures from PDF files.

CFPDF Documentation

Introduced in ColdFusion 11: Use the action ="sign", "unsign", "validatesignature", "readsignaturefields" for creating a digital signature, removing the digital signature, validating the signatures of a document, and for reading the signature fields respectively.

Further down at the bottom of the documentation:

  • For action ="readsignaturefields":

  • Reads all the signature fields and returns a query object in the variable indicated by attribute name. This query object will have five columns. The five columns are:

a) Signed - fully qualified name of the signature field.

b) Authored - indicates if this field can contain an author signature or not.

c) Can_Be_Signed - whether this field can be signed.

d) Can_Be_Authored - tells if this field is already signed or not

e) Visible - tells if the field is visible.

<!--- Read info about signature fields in a input pdf in a variable and dump it --->

<cfpdf action="readsignaturefields" source="#filepath##inputfilename#" name="signinfo" password="owner" />

<cfdump var="#signinfo#"/>