Search code examples
asp.nethtmlelectronic-signaturetopaz-signatures

Electronic signatures in web pages


I have an ASP.Net application. It is an application where people fill out forms. Well, we would like for people to be able to sign the form electronically(as in, their hand written signature) so that the signatures are held in the server and displayed on the web page.

Is there any kind of support for doing this kinda thing without having to resort to ActiveX controls? We would really strongly like to stay away from those. Is there anything up and coming that could be of some help such as the Canvas HTML5 tag or anything like that? It'd be super neat if we could support both signature pads and tablet PCs.

Also, electronic signatures are required because we would prefer if they signed the form through the computer and stored it on our server rather than printing it off, signing it, and filing it away in some place to become out of date.


Solution

  • Actually what we ended up doing is the following:

    On the client's machine a custom made web server is run. The web server does the interfacing with the signature pad. We have control over everyone using our site so this is not a problem.

    On our website we have a series of buttons like "sign" "clear" and "done". When the sign button is clicked it will begin a process which will poll the localhost server every 50 or 100ms or so with an image tag created like so <img src="http://127.0.0.1?signature&time=..." /> (where the ... is the current time so no caching issues). This makes it so that the image can be clearly seen in the browser and works well for every browser I've tested it in.

    Then when the user clicks done in order to get the image's actual data to be accessible from the server we use a JSONP request(so that we can cross the domain border) to get a base64 encoded value of the image and/or signature data. We store this in a hidden field. Whenever the user clicks save for the form(or whatever) then this hidden field gets sent to the server and saved.

    This would also be easy to have so that there is an option for tablet computers so that it uses a <canvas> control or similar to allow direct drawing on the screen.