What's the best way to capture a signature online?
I'm building a website application in PHP that requires a signature from the end user.
For this part of the website it will be exclusively viewed on Windows based tablets.
So, my question is this:
What's the best way to capture a signature online?
I've looked at flash or HTML5 canvas/excanvas, but 开发者_高级运维I am seeking a more experienced answer.
Thanks.
From: http://willowsystems.github.io/jSignature
jSignature is a JavaScript widget (a jQuery plugin) that simplifies creation of a signature capture field in a browser window, allowing a user to draw a signature using mouse, pen, or finger.
Works in all mainstream browsers that support Canvas or Flash Captures signatures as smooth vector images. (Yes, SVG is supported!) Ingenious, super-efficient (i.e. not lagging) real-time curve smoothing. Allows manipulation of signature strokes, like “Undo last stroke” Automatically adapts to your page’s layout and colors. Free and Open Source.
The documentation is very clear and the demo shows you how it works.
I needed to capture signatures for a current project and found Signature Pad to be very useful. It uses HTML5 canvas, json and jQuery.
https://thomasjbradley.github.io/signature-pad/examples/accept-signature.html
Flash would be great if you need to support older tablets, running non HTML 5 capable systems. Some things to keep in mind:
Try to transfer the data as a common image format. GIF or PNG would be ideal. This will make it far easier to keep track of and to parse through at a later date. Future-proofing, since a custom or uncommon format may fall out of favor faster.
Transfer the data over a secure connection. Always.
Remember that the legality of this is dubious. Both for use as a binding contract, and also for the transfer of the signature itself. Consult a lawyer if you haven't yet. Ideally one who deals with digital contracts.
Try the Signature class from Objective.js. Very simple to use. The test program shows how to add it in PHP to a document. All you need is a canvas, create an instance of a Signature and pass the canvas to the object. The code is 115 lines.
http://www.objectivejs.org/en/manual/objective-js/signature
Objective.js - Programming object oriented interfaces and animations in JavaScript
精彩评论