如何在C#中使用Microsoft Office interop将pdf转换为word(,doc) [英] How can I convert pdf to word(, doc) using Microsoft office interop in C#

查看:827
本文介绍了如何在C#中使用Microsoft Office interop将pdf转换为word(,doc)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Microsoft office interop将我的pdf文件转换为单词,我已经通过网络搜索但我只得到了pdf转换的答案,任何人都有问题的链接请分享我



注意:我只想使用Microsoft办公室互操作而不是任何其他第三方dll



我尝试了什么:



我仍​​在搜索网络

I want to convert my pdf file to word using Microsoft office interop, i have searched through the net but i got answers for only to pdf conversion,any one have link for the question please share me

note : i want to use only Microsoft office interop not any other 3rd party dll

What I have tried:

still i am searching through the net

推荐答案

我用谷歌搜索word自动保存为pdf并找到大量示例,这里是一个;



Office Word文档到PDF转换。 C#中的示例,Visual Studio 2012的VB.NET [ ^ ]



请在提问前做基础研究。另请注意,interop只是一种允许.net组件与COM组件通信的方式(Word是一个COM服务器),运行代码的任何计算机仍然需要安装Word并且作为interop工作只是一种自动化Word的方法.net。
I googled "word automation save as pdf" and found loads of examples, here is one;

Office Word Document to PDF Conversion. sample in C#, VB.NET for Visual Studio 2012[^]

please do basic research before asking a question. Also note that "interop" is simply a way of allowing .net component talk to COM components (Word is a COM server), any computer your code runs on will still need Word installed and working as interop is just a way of automating Word from .net.


如果您不想使用任何第三方库,那么您需要从Adobe获取PDF规范的副本并编写自己的PDF阅读器。另外,请查看 iTextSharp,一个.NET PDF库。 SourceForge.net [ ^ ]。
If you do not want to use any 3rd party library then you need to get a copy of the PDF specification from Adobe and write your own PDF reader. Alternatively take a look at iTextSharp, a .NET PDF library | SourceForge.net[^].


这篇关于如何在C#中使用Microsoft Office interop将pdf转换为word(,doc)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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