通过 Javascript 进行 Adobe Reader 插件交互
我正在显示在 ASP 页面中即时生成的 PDF 文件。 PDF 生成(并下载到客户端)可能需要一些时间,我想向用户提供一些反馈(加载消息或其他内容)。
AFAIK 无法知道 PDF 何时被查看,因为加载 Adobe Reader 插件时会触发 DOM 事件(即使它尚未显示任何内容)。
我注意到插件对象有一个我可以使用的 Javascript API。 我注意到它有一个 LoadFile 方法,但不幸的是它似乎没有做太多事情。 Adobe的文档确实没什么用。 它仅将 Javascript 作为一种插件编写语言或作为 OLE 交互(而且很差)。
有 API 的文档吗?是否可以知道 PDF 何时加载? 如果我可以将 PDF 流传递给某种 PDF 查看器,那就完美了。
I'm displaying PDF file that are generated on-the-fly within a ASP page. The PDF generation (and download to the client) can take some time and I'd like to provide the user with some feedback (a loading message or something).
AFAIK there's no way to know when the PDF is viewed because the DOM events get triggered when the Adobe Reader plugin gets loaded (even though it's not displaying anything yet).
I noticed that there's a Javascript API for the plugin object that I could potentially use. I notivced a LoadFile
method on it but unfortunately it doesn't seem to do much.
Adobe's documentation is really useless. It talks of Javascript only as a plug-in writting language or as OLE interaction (and poorly).
Is there any documentation for the API and is it possible to know when the PDF has been loaded? It would be perfect if I could pass on a PDF stream to a PDF viewer of some sort.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也想这么做,找到了一个可以帮助你的页面。
http://www.adobe.com/devnet/acrobat/javascript.html
I've wanted to the same, found a page that may help you out.
http://www.adobe.com/devnet/acrobat/javascript.html