I am using this signature pad for capturing signature in html. https://github.com/szimek/signature_pad
In my javascript :
var signaturePad = ne