How to get the data from HTML Canvas

Hi all,
I am developing a web application using Vaadin 7 and I have to get the signature of the user .
I am trying to draw on a canvas using mouse and get that image as signature.
I have been trying the following
but I am not able to get the drawn signature (as image or as any other output).
Anybody got any Idea on this???..
It would be a great help for me.

Hi Anil
I have the same problem…
I want to save my canvas as image to a specific folder of my application.
How can I do this ?
Anyone know this…??

Hey guys,

Sorry that I couldn’t be of more help, but perhaps this GWT widget might help? GWT’s Canvas:

I think the method
does what you want. Example, Image img = new Image(canvas.toDataUrl().

Thanks Joacim Päivärinne for your response.
How can I use this gwt canvas in my Vaadin 7 application?

I’d probably look at how Henri made his add-on and go from there;

Ever figure out how to save a canvas image to the server?


You’ll have to extend the original Canvas add-on so that you can use the
from the GWT Canvas implementation. Something along these lines, String dataURL = getWidget().toDataUrl(). Maybe register an RPC and call it at every postLayout().