How can I open an Attachment from a PDF Portfolio?

不打扰是莪最后的温柔 提交于 2019-12-25 13:17:15

问题


I'm currently creating a PDF portfolio which displays data in a dataGrid. There are a number of attachments and when I doubleclick the specific attachment I would like it to display in a new acrobat/reader window.

Could anyone instruct me?

Chris


回答1:


As far as I know, this cannot be done in a web-based Flash file. It must be done in an AIR Application.

See this Adobe article. Relevant information:

In AIR 2, you can open a file using the application registered by the operating system to open it. For example, an AIR application can open a DOC file with the application registered to open it. Use the openWithDefaultApplication() method of a File object to open the file.

You can use FileReference to allow the user to save the PDF to their system, but I do not believe there is a way to force it to open within an application. In fact, I don't think you can force an application to open via a download (without user permission, anyway) via standard JS/PHP methods either (I'm not a master of either of these, so I could be wrong there)




回答2:


Originally I was having serious issues accessing the host using a flex4 project.

This led me to switching to flex3 because I had found many examples of code that works just fine.

These examples can be found here



来源:https://stackoverflow.com/questions/13015162/how-can-i-open-an-attachment-from-a-pdf-portfolio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!