Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am having index.html page in that page I am having svg tag (or Control). Here I would like to save that SVG as image in by local system by clicking on save button at client side only.

I am trying to implement the example from the URL : http://plnkr.co/edit/syNxhUQl4QkyAGVtmqHj?p=preview[^]. Its working in chrome but my target browser is IE.

Your help is needed.
Posted
Comments
Sergey Alexandrovich Kryukov 9-Sep-15 9:07am    
And where is the implementation of saving as image in your example? If could become extremely difficult problem for JavaScript, if you mean creating of a bitmap image. Is it what you mean? What format of output image do you want? More importantly, why? Why not saving SVG itself, which make whole lot more sense than any other image type?
—SA
M.Bharath Bhushan 10-Sep-15 2:47am    
The example what I am trying it don't have implementation for saving SVG as image.
I have not found such type examples, so I am trying to save the SVG only at client side.

But my actual requirement is to save SVG as image(.png or any thing).

Code is
<div id="mydiv">
<svg xmlns="http://www.w3.org/2000/svg">
----Some SVG data will be here-----

</div>

Unfortunately I have not found sample for my requirement.
Sergey Alexandrovich Kryukov 10-Sep-15 2:59am    
Why doing such crazy thing, saving SVG as image, adding a lot more bytes and loosing so much information? Anyway, client-side generation of a bitmap image would be really difficult. No wonder you could not find "such type examples"; not many would volunteer to do so much work for so miserable goal...
—SA
Sergey Alexandrovich Kryukov 10-Sep-15 10:42am    
Who are you talking to?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900