C# 使用免费的第三方 dll 将 word 转换为 pdf
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10442772/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Convert word to pdf using free third party dll
提问by V_B
I want to convert word document to pdf.
我想将word文档转换为pdf。
i found lots of solution using office dll. But i want a solution using free third party dll because in office dll there must be office installed. so on my server there is'n office installed.
我找到了很多使用 office dll 的解决方案。但我想要一个使用免费第三方 dll 的解决方案,因为在 office dll 中必须安装 office。所以在我的服务器上没有安装办公室。
Is there any free third party dll???
有没有免费的第三方dll???
回答by danimal
EDIT: Oops, looks like you do have to have office installed. One of the comments in the second link mentions using OpenXmlPowerTools.HtmlConvertor and iTextSharp to convert the document into HTML, and then going to a PDF. Good luck with that!
编辑:哎呀,看起来你必须安装办公室。第二个链接中的评论之一提到使用 OpenXmlPowerTools.HtmlConvertor 和 iTextSharp 将文档转换为 HTML,然后转到 PDF。祝你好运!
If you're using .docx files, check out DocX:
如果您使用 .docx 文件,请查看 DocX:
Then take a look at this blog post for an example on using DocX to convert to PDF:
然后查看此博客文章,了解使用 DocX 转换为 PDF 的示例:
Converting .docx into (.doc, .pdf, .html)
将 .docx 转换为 (.doc, .pdf, .html)
Hope this helps. I'm not aware of any free solutions that will work with older versions of Word (.doc).
希望这可以帮助。我不知道有任何免费的解决方案可以与旧版本的 Word (.doc) 一起使用。

