简体   繁体   中英

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. I need to be able to communicate with PDF from the web page:

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

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.

My questions:

a) The UI of my page is Flex. Is it possible to do this interaction directly from Flex?

b) If not, is it possible to do this from browser 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.

c) Or does the Acrobat Reader ActiveX control expose methods to perform these operations from browser 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? (Apart from Acrobat 3D, I am evaluating a few such as 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.

For highlighting especific parts of a 3D model, the usual way to do it is using "marked content" while the file is being generated. See the chapter called "Interactive Features" of the Adobe PDF specification for more details on this. Here is an example from Acrobat Reader with some file I found somewhere on the web:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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