如何使用 Acrobat SDK 将 PDF 转换为 Word? [英] How to convert PDF to Word using Acrobat SDK?

查看:52
本文介绍了如何使用 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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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