问题将单词转换为PDF,无需offce或openoffice [英] Question Convert word to PDF without offce or openoffice

查看:95
本文介绍了问题将单词转换为PDF,无需offce或openoffice的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是你是否可以使用c#将Word文档转换为pdf而无需在服务器上安装Office

my question is whether you can convert Word documents to pdf using c # without having to install Office on the server

推荐答案

而不是需要Office的Office互操作程序集要安装,您可以使用Open XML SDK:

http ://www.microsoft.com/en-us/download/details.aspx?id = 30425 [ ^ ]。



这样,你可以支持新的XML-基于Office格式(如.DOCX,.XLSX),ECMA-376标准:

http:// en.wikipedia.org/wiki/Microsoft_Office_XML_formats [ ^ ],

http://en.wikipedia.org/ wiki / Office_Open_XML [ ^ ]。



这是另一种选择: http://npoi.codeplex.com/ [ ^ ]。



要使用PDF,您可以使用iText或其.NET端口,iTextSharp:

http://en.wikipedia.org/wiki/IText [ ^ ],

http://itextpdf.com/ [ ^ ],

http://sourceforge.net/projects/itextsharp/ [ ^ ]。



包括对Java iText网站的引用,因为大多数文档都在那里。如果您了解C#,那么理解基于Java的API文档并不困难。



-SA
Instead of Office interop assemblies which require Office to be installed, you can use Open XML SDK:
http://www.microsoft.com/en-us/download/details.aspx?id=30425[^].

This way, you can support new XML-based Office formats (such as .DOCX, .XLSX), ECMA-376 standard:
http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats[^],
http://en.wikipedia.org/wiki/Office_Open_XML[^].

This is another option: http://npoi.codeplex.com/[^].

To work with PDF, you can use iText, or its .NET port, iTextSharp:
http://en.wikipedia.org/wiki/IText[^],
http://itextpdf.com/[^],
http://sourceforge.net/projects/itextsharp/[^].

In included the reference to Java iText site as well, because most documentation is there. If you understand C#, it would not be difficult to understand Java-bases API documentation.

—SA

这篇关于问题将单词转换为PDF,无需offce或openoffice的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆