如何从Internet Explorer嵌入式对象访问完整的Adobe Acrobat AcroExch COM API? [英] How to access full Adobe Acrobat AcroExch COM API from Internet Explorer embedded object?
问题描述
我有以下情况:
- 32位Windows 7 SP1上的Internet Explorer 9
- Adobe Acrobat Professional版本10
- 具有以下代码的网页:
< object data ="foo.pdf" src ="foo.pdf">
鉴于:
- 系统上的默认PDF阅读器是Adobe Acrobat
- 禁止使用Adobe Reader的浏览器插件,而推荐使用Acrobat的插件
- 插件加载时Acrobat.exe正在运行
- 我正在使用Internet Explorer的COM自动化(来自Ruby,但这并不重要)来获取对
object
的AxAcroPDFLib.AxAcroPDF
对象的引用
- The default PDF reader on the system is Adobe Acrobat
- Adobe Reader's browser plugin is suppressed in favor of Acrobat's plugin
- Acrobat.exe is running when the plugin loads
- I'm using Internet Explorer's COM automation (from Ruby, but that doesn't really matter) to obtain a reference to the
object
'sAxAcroPDFLib.AxAcroPDF
object
使用此 AxAcroPDFLib.AxAcroPDF
对象,我需要操作表单字段,读取文本以及执行与 AcroExch.PDDoc
API完全合理的其他工作,然后单击网页上的一个按钮(使用IE自动化)以将表单字段序列化为XML并将其保存到Web服务器.
With this AxAcroPDFLib.AxAcroPDF
object, I need to manipulate form fields, read text, and do other stuff that is perfectly reasonable to do with the AcroExch.PDDoc
API, and then click a button on the webpage (using IE automation) to serialize the form fields to XML and save them to the webserver.
由于业务需求,我需要从用户角度测试此端到端",因此我不能只将值填充到XML中,看看服务器是否接受它们.
I need to test this "end to end" from a user perspective due to business requirements, so I can't just stuff values in the XML and see if the server takes them.
是否可以从 AxAcroPDFLib.AxAcroPDF
参考资料中访问打开的PDF文档的 AcroExch.PDDoc
API,无需保存将PDF转换为磁盘上的文件,然后使用 AcroExch.App
将其打开?
Is there any way to access the AcroExch.PDDoc
APIs of the opened PDF document from the AxAcroPDFLib.AxAcroPDF
reference, without saving the PDF to a file on disk and opening it in using AcroExch.App
?
问题是,据我所知,如果我将其保存到磁盘并在Acrobat中重新打开,则该文件不能用于保存表单字段数据并将其提交到Web服务器.(还是可以?)
The problem is that if I save it to disk and re-open it in Acrobat, that file cannot be used to save and submit the form field data to the web server, as far as I know. (Or can it?)
推荐答案
有什么方法可以访问打开的PDF的AcroExch.PDDoc API.AxAcroPDFLib.AxAcroPDF参考中的文档,但不保存将PDF转换为磁盘上的文件,然后使用AcroExch.App将其打开吗?
Is there any way to access the AcroExch.PDDoc APIs of the opened PDF document from the AxAcroPDFLib.AxAcroPDF reference, without saving the PDF to a file on disk and opening it in using AcroExch.App?
我认为您不能使用 AxAcroPDFLib.AxAcroPDF
来做到这一点.检查为Adobe®Reader®开发" ,第25页("OLE自动化"):
I don't think you can do this with AxAcroPDFLib.AxAcroPDF
. Check "Developing for Adobe® Reader®", page 25 ("OLE automation"):
在Windows上, Adobe Reader唯一支持的OLE自动化是PDF浏览器控件界面,使您可以处理PDF文档作为外部应用程序中的ActiveX文档.这可以加载文件,移动到文件,突出显示文本选择,并指定各种打印和显示选项,如下所示.
On Windows, the only OLE automation supported for Adobe Reader is the PDF browser controls interface, which enables you to treat a PDF document as an ActiveX document within an external application. This makes it possible to load a file, move to various pages within the file, highlight a text selection, and specify various print and display options, as shown below.
Further, there's a detailed list of the supported APIs, and you can also confirm that with OleView.
开发Adobe Acrobat插件可能,但是:
It might be possible to develop an Adobe Acrobat plugin, but:
任何为Adobe Reader编写的插件都必须启用Reader,意味着您将需要获得Adobe的许可和许可系统.
Any plug-ins written for Adobe Reader must be Reader-enabled, which means that you will need to obtain permission and licensing from Adobe Systems.
这篇关于如何从Internet Explorer嵌入式对象访问完整的Adobe Acrobat AcroExch COM API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!