I want open Pdf file in c# codes , I want use office word 2013 (Microsoft.Office.Interop.Word) with c# and save as word file in c#, how can I it ?
我想在c#代码中打开Pdf文件,我想用c#使用office word 2013(Microsoft.Office.Interop.Word)并在c#中保存为word文件,我该怎么办?
2 个解决方案
#1
Give the guy a break, it is his first question and he has actually created an account with a picture an everything so I genuinely believe he is here to learn.
让这个家伙休息一下,这是他的第一个问题,他实际上创建了一个带有图片的帐户,所以我真的相信他在这里学习。
I have just done a quick google and it looks as though there is no native support for this, I would suggest you search for a an api to do it. I found this one which gave you code but I have no idea if it is a good framework or not, the code sample they give is a little over complicated imo.
我刚刚做了一个快速谷歌,看起来好像没有本机支持,我建议你搜索一个api来做到这一点。我找到了一个给你代码的但是我不知道它是否是一个好的框架,他们提供的代码示例有点过于复杂的imo。
http://www.yiigo.com/guides/csharp/how-to-pdf-convert-word.shtml
If you are genuine then Good Luck. I would recommend looking at the way other people post questions in the future, there are a lot of people on here who help people out and sometimes it is hard to sift through all of the questions where it looks like the asker is wanting people to solve their problems because they can't be bothered.
如果你是真的那么祝你好运。我建议看看其他人将来发布问题的方式,这里有很多人帮助别人,有时很难筛选所有问题,看起来问问者想让人们解决他们的问题,因为他们不能打扰。
#2
`
Wrdapp= new Word.Application();
FileConverter converter=Wrdapp.FileConverters[5];
//For checking format name
converter.FormatName;
Wrdapp.Open("PDF file path",Format:converter.OpenFormat);`
The file will be converted if the converters are installed with office 2013 and above
如果使用Office 2013及更高版本安装转换器,则将转换该文件
#1
Give the guy a break, it is his first question and he has actually created an account with a picture an everything so I genuinely believe he is here to learn.
让这个家伙休息一下,这是他的第一个问题,他实际上创建了一个带有图片的帐户,所以我真的相信他在这里学习。
I have just done a quick google and it looks as though there is no native support for this, I would suggest you search for a an api to do it. I found this one which gave you code but I have no idea if it is a good framework or not, the code sample they give is a little over complicated imo.
我刚刚做了一个快速谷歌,看起来好像没有本机支持,我建议你搜索一个api来做到这一点。我找到了一个给你代码的但是我不知道它是否是一个好的框架,他们提供的代码示例有点过于复杂的imo。
http://www.yiigo.com/guides/csharp/how-to-pdf-convert-word.shtml
If you are genuine then Good Luck. I would recommend looking at the way other people post questions in the future, there are a lot of people on here who help people out and sometimes it is hard to sift through all of the questions where it looks like the asker is wanting people to solve their problems because they can't be bothered.
如果你是真的那么祝你好运。我建议看看其他人将来发布问题的方式,这里有很多人帮助别人,有时很难筛选所有问题,看起来问问者想让人们解决他们的问题,因为他们不能打扰。
#2
`
Wrdapp= new Word.Application();
FileConverter converter=Wrdapp.FileConverters[5];
//For checking format name
converter.FormatName;
Wrdapp.Open("PDF file path",Format:converter.OpenFormat);`
The file will be converted if the converters are installed with office 2013 and above
如果使用Office 2013及更高版本安装转换器,则将转换该文件