0

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 :)

El Ronnoco
  • 11,753
  • 5
  • 38
  • 65

1 Answers1

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.

Taneli Waltari
  • 677
  • 3
  • 5
  • Hi Thanks for the answer, I hadn't come across IECapt. It says it has "experimental support for Enhanced Metafile vector graphic output" but do you know if that will encompass VML output? As for the cloud I can't go down that route as I'm developing on a corporate intranet and there would be all sorts of issues around confidentiality/firewalls etc... – El Ronnoco Dec 14 '10 at 12:08
  • 1
    What you are looking for is VML input. The WMF output means that you can save a web page as WMF vector graphics. Due to its scalable nature, WMF might be more suitable to e.g. printing than PNG. – Taneli Waltari Dec 14 '10 at 12:44
  • I haven't got this working yet but it looks like the only way to go! Thanks. – El Ronnoco Dec 14 '10 at 16:30