Note that there are some explanatory texts on larger screens.

plurals
  1. POSaving Raphaël image as PNG on Internet Explorer
    primarykey
    data
    text
    <p>I have some nice graphics done using <a href="https://en.wikipedia.org/wiki/Rapha%C3%ABl_%28JavaScript_library%29" rel="nofollow">Raphaël</a> (a JavaScript library), and I want to add a feature to save it as a <a href="http://en.wikipedia.org/wiki/Portable_Network_Graphics" rel="nofollow">PNG</a> file.</p> <p>This is simple on every browser except Internet&nbsp;Explorer, because on non-Internet&nbsp;Explorer browsers I get <a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics" rel="nofollow">SVG</a> as an output from Raphaël, and then I can convert it to canvas (using cansvg library) and canvas has a <code>toDataURL()</code> method. But on Internet&nbsp;Explorer, Raphaël outputs <a href="https://en.wikipedia.org/wiki/Vector_Markup_Language" rel="nofollow">VML</a>. I can't use the <a href="http://en.wikipedia.org/wiki/Google_Chrome" rel="nofollow">Chrome</a> frame plugin. Why? </p> <p>Users of my application choose Internet&nbsp;Explorer just because it is preinstalled on Windows, and they don't have permission to install anything else. So they can't install this plugin. So my second idea was to get an SVG string on Internet&nbsp;Explorer, pass it to cansvg to get a canvas and then use <code>flashCanvas</code>. </p> <p>I tried to trick Raphaël to think it's running on a non-Internet&nbsp;Explorer browser and get SVG as output, but I failed, as Raphaël use some JavaScript functions that are absent in Internet&nbsp;Explorer to produce SVG. </p> <p>So how do I accomplish this task under Internet&nbsp;Explorer?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload