Convert VML graphic to bitmap on the ASP.NET server

≡放荡痞女 提交于 2019-12-25 04:45:08

问题


I'm using RaphaelJS. The browser renders a chart for me (which is in VML as all my users are on IE). I want the user to be able to save this image and share it normally eg paste into an email, into powerpoint, into a document etc etc.

Problem is not many things can render VML. I can easily get the VML markup describing the image back to the server. All I want to do is convert it to some kind of more universal format eg PNG, BMP, GIFF, whatever which I can then allow the user to download.

I've seen lots of people struggling with this. I would have thought the seeing as VML is Microsoft's proprietary SVG format they might have at least provided facilities within their own languages (C#,VB.net) to convert VML to bitmaps.

Anyone know how?

(Incidentally I can't use PHP - I've seen a lot of people attempting to solve this with a PHP based solution)

Thanks :)


回答1:


You can use the Internet Explorer ActiveX control and screenshotting techniques to achieve this. See the open source tool IECapt as an example.

You could also evaluate whether a cloud service like Litmus API could be used.



来源:https://stackoverflow.com/questions/4438488/convert-vml-graphic-to-bitmap-on-the-asp-net-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!