如何在asp.net中将单词转换为图像文件?(How to convert word to image files in asp.net? [duplicate])

编程入门 行业动态 更新时间:2024-10-25 04:18:07
如何在asp.net中将单词转换为图像文件?(How to convert word to image files in asp.net? [duplicate])

这个问题在这里已有答案:

使用C# 2答案 将Word文件页面转换为jpg图像

我有一些doc或docx文件。如果我将doc文件上传到服务器,我想自动将它们转换为图像。 有没有人有解决方案来解决这个问题? 最终目标就是这样。 http://www.liuyang.gov.cn/lyswszf/rdzt/15762/content_114176.html谢谢。

This question already has an answer here:

Convert Word file pages to jpg images using C# 2 answers

I have some doc or docx files.I want to convert them to images automatically if I upload doc files to server. Does anyone have solutions to solve this problem? the final target is just like this. http://www.liuyang.gov.cn/lyswszf/rdzt/15762/content_114176.html thanks .

最满意答案

使用第三方组件:Aspose.Words,它可以为您完成。

Document doc = new Document(MyDir + "Document.doc"); doc.Save(MyDir + "Document.ConvertToHtml Out.html", SaveFormat.Html);

它还支持保存到Png格式。

SaveFormat.Png:呈现文档的页面并将其另存为PNG文件。

use a third party component: Aspose.Words, it can do it for you.

Document doc = new Document(MyDir + "Document.doc"); doc.Save(MyDir + "Document.ConvertToHtml Out.html", SaveFormat.Html);

it also support save to Png format.

SaveFormat.Png: Renders a page of the document and saves it as a PNG file.

更多推荐

本文发布于:2023-07-09 02:23:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1082890.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:转换为   中将   单词   图像文件   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!