本文介绍了如何使用Acrobat SDK将PDF转换为Word?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的.Net应用程序需要以编程方式将PDF文档转换为Word格式.

My .Net application needs to convert a PDF document to Word format programmatically.

我评估了几种产品,并发现了 Acrobat X Pro ,它另存为选项,我们可以将其保存为Word/Excel格式的文档.我尝试使用Acrobat SDK,但找不到从哪里开始的正确文档.

I evaluated several products and found Acrobat X Pro, which gives a save as option where we can save the document in Word/Excel format. I tried to use Acrobat SDK but couldn't find proper documentation from where to start.

我调查了他们的IAC示例,但不明白如何调用菜单项并使其执行另存为"选项.

I looked into their IAC sample but couldn't understand how to call the menu item and make it execute the save as option.

推荐答案

您可以使用Acrobat X Pro做到这一点,但是您需要在c#中使用javascript API.

You can do this with Acrobat X Pro, but you need to use the javascript API in c#.

 AcroPDDoc pdfd = new AcroPDDoc();
 pdfd.Open(sourceDoc.FileFullPath);
 Object jsObj = pdfd.GetJSObject();
 Type jsType = pdfd.GetType();
 //have to use acrobat javascript api because, acrobat
 object[] saveAsParam = { "newFile.doc", "com.adobe.acrobat.doc", "", false, false };
 jsType.InvokeMember("saveAs",BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance,null, jsObj, saveAsParam, CultureInfo.InvariantCulture);

希望有帮助.

这篇关于如何使用Acrobat SDK将PDF转换为Word?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-16 11:42