Accessibility

Acrobat Developer Center

JavaScript for Acrobat 3D

Acrobat 3D Version 8 and the Adobe Reader include support for 3D Annotations®, which means 3D CAD models can be embedded within a PDF, and interactively explored through manipulations available in the default toolbar.

The new associated class of JavaScripts for 3D adds a virtually unlimited set of possibilities. These include: specifying the render modes and 3D matrix transformations of any of the individual meshes; setting camera position, target, and field of view; detecting mouse and keyboard events; controlling animations, and many more behaviors. Time Event Handlers allow any attribute to be changed continuously over time. There are over 800 function calls in the JavaScript API for 3D Annotations alone. In addition to this, extra 3D models and images can be loaded into the 3D Annotation as Resources.

As JavaScript is a fully object-oriented language, it is possible for arbitrarily complex software modules to be built and maintained. The document-side JavaScript communicates with this 3D Annotation JavaScript using a handle: the 3D Context. Thus, all user interaction in the PDF file can communicate with the 3D Annotation JavaScript through the various links, buttons, and other actions available as part of the standard toolset.

JavaScript for Acrobat 3D Annotations Sample files (ZIP, 4.7 MB)

JavaScript for Acrobat 3D Annotations API Reference (PDF, 1.3 MB)


This document provides a brief overview of the JavaScript for Acrobat 3D Annotations API followed by a description of the objects. The JavaScript API allows you to manipulate 3D annotations within PDF documents. Developers who want to enhance the 3D experience of the user beyond the default behaviors can use the JavaScript API for 3D annotations to specify the render modes and 3D matrix transformations of any of the individual meshes; set camera position, target, and field of view; detect mouse and keyboard events; control animations, and many more behaviors.

Creating 3D Annotations Programmatically

Developing Plug-ins and Applications (PDF, 4.6M )

This supporting documentation for the Acrobat SDK sample “Embed3dData” describes how to programmatically create 3D annotations in PDF files using the Acrobat SDK or the PDF Library SDK. It provides code that illustrates how to perform various tasks such as creating a 3D annotation at a particular location on a PDF page, specifying a U3D file as a 3D stream to be used in the annotation, specifying a view of the 3D objects to be displayed by default, specifying a JavaScript file to be used for animation or other purposes, and providing two-dimensional content that can be displayed as a poster prior to activating the annotation.

Connecting Document JavaScript to 3D Views (PDF, 1.8M)


Acrobat 7 Professional contains a new tool, the 3D Tool which allows you to embed U3 (Universal 3D) objects in a PDF document. Once this 3D model is embedded in a PDF, it can be distributed and viewed by anyone with Acrobat or Adobe Reader 7.x

Webinar: Working with Acrobat 3D JavaScript (SWF, 26 min.)