SVG 到 VML - 如何?
我有一个 SVG 文件,我想在 Internet Explorer 中查看该文件。
IE 使用 VML 作为矢量文件,但我在任何地方都找不到这两种格式之间的任何类型的转换器! (Inkscape、Illustrator、OpenOffice Draw 中没有……这怎么可能!)
我看了一下 Raphael,但 Raphael 无法读取现有文件。
我发现 http://vectorconverter.sourceforge.net/index.html
但我无法理解如何使用它...有什么帮助吗?
I have an SVG file, which I would like to view in Internet Explorer.
IE uses VML for vector-files, but I can't find ANY kind of converter between those two formats anywhere! (not in Inkscape, Illustrator, OpenOffice Draw.....how is this possible !)
I took a look at Raphael, but Raphael can't read existing files.
I found http://vectorconverter.sourceforge.net/index.html
but I can't understand how to use it... any help ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
试试这个 - SVG 路径到 VML 路径。它基本上将 SVG 路径转换为可在
v:shape
中使用的 VML 路径。但是您仍然需要将 SVG 的path
转换为v:shape
手动。您尝试过的矢量转换器是基于 Web 的,并使用 XSLT 模板进行转换,而我建议的库可以使用纯 javascript 和单行代码来完成转换。希望这有帮助。Try this - SVG path to VML Path. It basically transforms SVG path into VML path that can be used in
v:shape
.However you still have to transform SVG'spath
intov:shape
manually. The vector converter that you have tried is web based and uses XSLT templates to do the transformation, while the library that i'm suggesting can do it with pure javascript and single line of code. Hope this helps.您可以尝试这个在线转换器:http://www.irunmywebsite.com/raphael/SVGTOHTML_LIVE.php< /a>
您可以在转换为 JSON 的形状之间进行选择,这些形状由 Raphael 管理。或者使用 Raphael 进行内联且更快的包裹。
我个人更喜欢JSON方法。您可以随意将内容放在外部文件和ajax绘图上。接下来,您将使用以下方法之一绘制形状:
或者如果您想在现有纸张上绘制:
您可以将最后一个函数放入 Raphael 插件中。
注意:您可以通过删除转换后的路径中的一些空格来节省一些 kb。以 ant 为例:
You can try this online converter : http://www.irunmywebsite.com/raphael/SVGTOHTML_LIVE.php
You can choose between shapes converted as JSON which are managed by Raphael. Or an inline and faster wrapping with Raphael.
I personally prefer the JSON method. You can put the content on an external file and ajax drawings at will. You will next draw the shapes with either of the following methods :
Or if you want to draw on an existing paper :
You can put the last function in a Raphael plugin.
Note : You can save some kb by removing some spaces inside the converted paths. For example with ant :
LibreOffice 可以读取从 Word 文档导入的 VML。您还可以下载并调整 SVG=> VML XSLT 并在 IE 中测试它,如下所示:
LibreOffice can read VML imported from a Word doc. You can also download and tweak the SVG=>VML XSLT and test it in IE like this: