纯.NET库转换DocX,PDF和图像 [英] Pure .NET Library To Convert DocX, PDF and Images

查看:91
本文介绍了纯.NET库转换DocX,PDF和图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Pure .NET Library如何转换DocX,PDF和图像

没有软件打印机。没有ActiveX。没有Office Automation ......不需要任何东西。

只需要使用此代码。我想知道使用下面代码的先决条件:



DocumentManager1.ConvertDocument(sample.docx,converted.pdf)

解决方案

由于明显的原因,大多数工具都不是纯.NET。首先,它与docx有关,它可以是Open XML SDK,Office Interop程序集或LibreOffice,所有这些都基于本机(非托管)代码。请查看我过去的答案:

如何从Add添加microsoft excel 15.0对象库MS Visual Studio 2010中的参考 [ ^ ],

Microsot office Interop [ ^ ],

在不使用Interop.word dll的情况下读取word文件...不想在IIS中安装单词.. [ ^ ],

您好如何使用c#.net 在Windows应用程序中显示word文件[ ^ ],

需要一个宁可独特的WPF文本编辑器控件 [ ^ ],

将Office文档转换为PDF而无需互操作 [ ^ ]。



请参阅:

http://msdn.microsoft.com/en-us/library/dd264733.aspx [ ^ ],

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



此外,请参阅Microsoft警告不要使用Office Interop:

http://support.microsoft.com/default.aspx ?scid = kb; EN-US; q257757#kb2 [ ^ ],

http ://support.microsoft.com/kb/257757/en-us [ ^ ]。



< DD> -SA

Using Pure .NET Library How To Convert DocX, PDF and Images
No software printer. No ActiveX. No Office Automation…nothing is required .
only this code needs to be used. I wanted to know the prerequisites of using the code below:

DocumentManager1.ConvertDocument ("sample.docx", "converted.pdf")

解决方案

Most of the tools are not "pure .NET", by apparent reasons. First of all it is related to "docx", which would be either Open XML SDK, Office Interop assembly or LibreOffice, all based on native (unmanaged) code. Please see my past answers:
How to add microsoft excel 15.0 object library from Add Reference in MS Visual Studio 2010[^],
Microsot office Interop[^],
Read a word file without using Interop.word dll...Do not want to install word in IIS..[^],
Hi how can i display word file in windows application using c#.net[^],
Need a rather unique WPF text editor control[^],
Convert Office-Documents to PDF without interop[^].

Please also see:
http://msdn.microsoft.com/en-us/library/dd264733.aspx[^],
and this alternative: http://npoi.codeplex.com/[^].

Also, please see Microsoft warnings against using Office Interop:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2[^],
http://support.microsoft.com/kb/257757/en-us[^].

—SA


这篇关于纯.NET库转换DocX,PDF和图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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