Skip to content

Instantly share code, notes, and snippets.

@khoan
Last active March 24, 2020 09:35
Show Gist options
  • Save khoan/ab39e0d8cb27b1289cdd246a2984a515 to your computer and use it in GitHub Desktop.
Save khoan/ab39e0d8cb27b1289cdd246a2984a515 to your computer and use it in GitHub Desktop.

https://github.com/szimek/signature_pad

https://kangax.github.io/jstests/toDataUrl_mime_type_test/

https://github.com/msanatan/legalesign-nodejs

http://www.graphicalweb.org/2010/papers/62-From_SVG_to_Canvas_and_Back/

function importCanvas(sourceCanvas, targetSVG) {
    // get base64 encoded png data url from Canvas
    var img_dataurl = sourceCanvas.toDataURL("image/png");

    var svg_img = document.createElementNS(
        "http://www.w3.org/2000/svg", "image");

    svg_img.setAttributeNS(
        "http://www.w3.org/1999/xlink", "xlink:href", img_dataurl);

    targetSVG.appendChild(svg_img);
}

https://www.hellosign.com/products/api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment