Shiv Kumar Ganesh
Shiv Kumar Ganesh

Reputation: 3825

Saving excanvas element as image in IE7/8

I am using IE7/8 for jqPlot for rendering canvas and would like to know if it is possible to print it out in jpg/png or any other format. I have been struggling with it from a long time and the only answer I got on web is nope.Is there any javaScript hack or screen scraping kinda tool which can help me to take an image of the graphs rendered on the canvas.Thanks

Upvotes: 2

Views: 1681

Answers (1)

Juliyanage Silva
Juliyanage Silva

Reputation: 2699

Hi there is a way to do this http://westside-consulting.blogspot.com/2011/05/some-users-of-jqplot-have-expressed.html go to this link nad you will be able to open the image in a new tab with this var img = $wnd.jQuery('#' + id).jqplotToImage(50, 50); if (img) { open(img.toDataURL("image/jpg")); }

You can find the complete js in above link and I did this with GWT and it will be easy to do this in js I guess..Good luck..

Upvotes: 1

Related Questions