首先,请查看原word文档:

第 1 步:在 Visual Studio 中创建一个 C# 项目,然后添加对 Spire.Doc.dll 的引用并使用以下命名空间。
using Spire.Doc;
第 2 步:创建一个 word 实例并从文件中加载源 word 文档。
Document doc = new Document();doc.LoadFromFile("Sample.docx");
第 3 步:将文档保存为 SVG 文件。
doc.SaveToFile("result.svg", FileFormat.SVG);
运行代码后,我们将从word文档中得到以下结果SVG文件的有效截图:

完整代码:
using Spire.Doc;namespace wordconversion.Case{class WordtoSVG{public WordtoSVG(){Document doc = new Document();doc.LoadFromFile("Sample.docx");doc.SaveToFile("result.svg", FileFormat.SVG);}}}
欢迎下载|体验更多E-iceblue产品
如需获取更多产品相关信息请咨询在线客服
标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!