1

我已经使用 Extjs 4.1 为用户提供了打印屏幕的选项来完成应用程序。在所有浏览器中都可以正常工作,没有蚂蚁问题。但在 IE9 中,除了 graph(Svg) 之外的一切都在打印。谁能告诉我如何在 IE9 中打印图表。或者如何将 svg 数据转换为图像 base64 ?非常感谢。谢谢

代码在这里

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='';
4

1 回答 1

0

我使用 RaphaelJS 并使用https://github.com/wout/raphael-svg-importhttps://github.com/crccheck/raphael-svg-import-classic加载 SVG 。之后,您可以使用http://www.phpepe.com/2012/07/export-raphael-graphic-to-image.html将其导出。看看那个。在我的情况下,我需要向用户呈现视觉表示和按钮来编辑/移动图像。

于 2013-06-18T07:31:38.433 回答