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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Repopulate Signature control

Thread ID:

Created:

Updated:

Platform:

Replies:

148177 Oct 9,2019 09:40 AM UTC Oct 10,2019 09:58 AM UTC ASP.NET Core 1
loading
Tags: Signature
Pete Marshall
Asked On October 9, 2019 09:40 AM UTC

Hi,

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.

Thanks

Ashokkumar Balasubramanian [Syncfusion]
Replied On 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"> 
    </div> 
    <script> 
        $(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); 
            } 
            obj.refresh(); 
        }); 
    </script> 
 
We have attached a sample for your reference in the following link 
 
 
 
Please let us know, if you require any further assistance on this. 
 
Regards, 
Ashokkumar B. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon