我有一些doc或docx文件。如果我将doc文件上传到服务器,我想自动将它们转换为图像。 有没有人有解决方案来解决这个问题? 最终目标就是这样。 http://www.liuyang.gov.cn/lyswszf/rdzt/15762/content_114176.html 谢谢。
答案 0 :(得分:3)
使用第三方组件:Aspose.Words,它可以为您完成。
Document doc = new Document(MyDir + "Document.doc");
doc.Save(MyDir + "Document.ConvertToHtml Out.html", SaveFormat.Html);
它还支持保存为Png格式。
SaveFormat.Png:呈现文档的页面并将其另存为PNG文件。