[Tex/LaTex] LaTeX 3D PDF with U3D file and media9: add a view at runtime

javascriptmedia9

I am wondering if I could hack media9 package to achieve such a feature: end-users should be able to add a new view of an animated U3D file at runtime. So I'll be editing the VIEWS FILE from a Javascript callback.
Do you think it is feasible for a person with intermediate knowledge level of TeX?
Thanks

Best Answer

Update:

Current versions of Acrobat Reader DC allow users to add new 3D views at runtime and to save them with the PDF file. Adding new 3D views does not require recompilation of the PDF from the TeX source anymore.


No, this is not possible in AdobeReader.

At runtime, a user may manipulate the 3D object in AdobeReader and produce new VIEW sections via the context menu (mouse right click), provided the 3Dmenu option was set during compilation of the PDF. He can add VIEW sections to an existing or to a blank new views-file (via copy/paste from the JavaScript console) and associate the modified views-file with the u3d/prc file via option 3Dviews during the next LaTeX run.

Thus, the user needs the complete LaTeX document source plus the u3d/prc files to be embedded and recompile the whole thing with the new view added.

Note that JavaScript cannot write to files directly, for security reasons.

The views-file is not embedded verbatim into the document, but parsed by LaTeX and translated into PDF objects when compiling the LaTeX document source.

Related Question