简体   繁体   English

与来自Flex或Javascript的3D PDF进行交互

[英]Interact with 3D PDF from Flex or Javascript

I'm working on a web application which displays a 3D model (Acrobat 3D PDF file) and allows users to interact with the model. 我正在使用一个Web应用程序,该应用程序显示3D模型(Acrobat 3D PDF文件)并允许用户与模型进行交互。 I need to be able to communicate with PDF from the web page: 我需要能够通过网页与PDF进行通信:

1) Programmatically highlight a node in the 3D PDF (given the node name) when, say, the user clicks on a list item referencing that node name in the web page 1)例如,当用户单击网页中引用该节点名称的列表项时,以编程方式突出显示3D PDF中的一个节点(给定节点名称)

2) The reverse way, know which node the user selected in the 3D PDF so I can highlight that node name in the web page. 2)相反,知道用户在3D PDF中选择了哪个节点,因此我可以在网页中突出显示该节点名称。

My questions: 我的问题:

a) The UI of my page is Flex. a)我页面的用户界面是Flex。 Is it possible to do this interaction directly from Flex? 是否可以直接从Flex进行此交互?

b) If not, is it possible to do this from browser javascript? b)如果不是,是否可以通过浏览器javascript做到这一点? (which I will in turn call from Flex) I have seen an article on browser-pdf communication (http://www.javabeat.net/articles/301-javascript-communication-between-html-and-pdf-in-itext-1.html) but am not sure if 3D objects can be accessed from external browser javascript. (我会依次从Flex调用)我看过一篇有关浏览器-pdf通讯的文章(http://www.javabeat.net/articles/301-javascript-communication-between-html-and-pdf-in-itext -1.html),但不确定是否可以从外部浏览器javascript访问3D对象。

c) Or does the Acrobat Reader ActiveX control expose methods to perform these operations from browser javascript? c)还是Acrobat Reader ActiveX控件公开了通过浏览器javascript执行这些操作的方法?

d) Lastly, do folks have any recommendations based on their experience, on which 3D CAD viewer software integrate with browsers and enable this kind of interaction? d)最后,人们是否有基于他们的经验的建议,即哪些3D CAD查看器软件与浏览器集成在一起并可以进行这种交互? (Apart from Acrobat 3D, I am evaluating a few such as 3DVIA Composer Player) (除了Acrobat 3D,我正在评估一些诸如3DVIA Composer Player的软件)

I have had very little experience with PDF 3D, but from what I know, I think you will need to add javascript code to your PDF file and even more javascript code to your HTML page so that you can stablish some kind of communication, and I seriously doubt you will be able to do it from Flex alone. 我对PDF 3D的经验很少,但是据我所知,我认为您需要将javascript代码添加到PDF文件中,甚至需要将更多javascript代码添加到HTML页面中,以便进行某种形式的交流,我严重怀疑您能否仅凭Flex就能做到。

For highlighting especific parts of a 3D model, the usual way to do it is using "marked content" while the file is being generated. 为了突出显示3D模型的特定部分,通常的方法是在生成文件时使用“标记的内容”。 See the chapter called "Interactive Features" of the Adobe PDF specification for more details on this. 有关更多详细信息,请参见Adobe PDF规范的“交互功能”一章。 Here is an example from Acrobat Reader with some file I found somewhere on the web: 这是Acrobat Reader的示例,其中包含一些我在网上找到的文件:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM