1

I have done application using Extjs 4.1 provided option to user to print screens. In all browser working fine without ant issues. But in IE9 except graph(Svg) everything is printing. Can any one tell me how to print graphs in IE9. or how to convert svg data to image base64 ? Great appreciated. Thank you

Code is here

var metricsNumberId = document.getElementById('metricsNumberId');
newWin= window.open();
newWin.document.write('<img src="'+metricsNumberId.innerHTML+'" width="400" height="400""/>');// This one way i have tried is not worked
newWin.document.write('+metricsNumberId.innerHTML+');// This another way i have tried is not worked
newWin.document.close();
newWin.focus();
newWin.print();
newWin.close();
newWin='';
Ramesh Lamani
  • 1,087
  • 2
  • 25
  • 51

1 Answers1

0

I did it using RaphaelJS and loading in the SVG using https://github.com/wout/raphael-svg-import or https://github.com/crccheck/raphael-svg-import-classic. After that you can export it using http://www.phpepe.com/2012/07/export-raphael-graphic-to-image.html Take a look at that. In my situation I needed to present the user with a visual representation and buttons to edit/move the image around.

Ee-P
  • 78
  • 4