We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Repopulate Signature control


I have set up the signature control to save to a database. 

Is it possible to load this back into the signature control? On a series of forms, I would like to prepopulate the control with the signature on record for the logged in user, so they can use it or redraw.


1 Reply

AB Ashokkumar Balasubramanian Syncfusion Team October 10, 2019 09:58 AM UTC

Hi Pete, 
Good day to you. 
Signature can be saved to a specific folder through AJAX. Please refer to the below KB document on how to save signature to a folder or database.  
After saving this image, you can render the signature control pre-loaded with this image using canvas. Since you need to load the signature during rendering, we suggest you render the control using JavaScript in Core project. Please refer to the following code.  
<div id="signature"> 
        $(function () { 
            // declaration 
            $("#signature").ejSignature({ height: "400px", isResponsive: true, strokeWidth: 3, width: "600px" }); 
            var obj = $("#signature").ejSignature("instance");  // Create object for signature control 
            canvas = obj._canvas[0]; 
            context = canvas.getContext("2d"); 
            var img = new Image; 
            img.src = "../Images/Signature.png"; //specify image source 
            context.clearRect(0, 0, canvas.width, canvas.height);  // Clear specified pixel 
            img.onload = function () { 
                context.drawImage(img, 0, 0); 
We have attached a sample for your reference in the following link 
Please let us know, if you require any further assistance on this. 
Ashokkumar B. 

Live Chat Icon For mobile
Up arrow icon