PDF Editing Issues

How to Use Acrobat 3D JavaScript to Control PRC Subnode Visibility

Elise WilliamsElise Williams Oct 28, 2026 869 views

Question details

The user is looking for guidance on writing Acrobat 3D JavaScript to manipulate PRC objects and dynamically control the visibility of child subnodes inside a 3D PDF document.

How to Use Acrobat 3D JavaScript to Control PRC Subnode Visibility
Product
Adobe Acrobat Pro
Device & OS
Windows 7 Pro
Scenario
Developing interactive 3D PDFs where specific child subnodes of a PRC model need to be moved or toggled (hidden/shown) using script commands.
Observed behavior
Needs to identify the correct API methods to access the runtime, read the model tree, and successfully apply visibility or transformation changes to 3D nodes.
Before you start

Ensure that your PRC model is correctly embedded in the PDF and that the target objects are explicitly exposed as distinct 3D nodes within the Acrobat Model Tree.

Solution 1Recommended

Use Acrobat 3D JavaScript APIs to Manage Nodes

Access the 3D annotation's runtime context in Acrobat Pro to script node visibility and transformations based on the model tree.

To manipulate PRC elements, your script must first obtain the 3D runtime context. Once connected to the scene, you can iterate through the meshes or target specific node names to alter their `.visible` property or apply a new transformation matrix.

1
Inspect the Model Tree

Open your 3D PDF in Acrobat Pro. Click on the 3D model to activate it, then open the Model Tree panel. Verify the exact names of the child subnodes you want to target.

2
Access the 3D Context

Use the document-level JavaScript `getAnnots3D()` method to retrieve the 3D annotation object, then access its `context3D` property to interact with the runtime.

3
Modify Subnode Visibility

Within the 3D JavaScript context, use the `scene.meshes.getByName('NodeName')` function to select your specific PRC object. Set its visibility property by assigning `node.visible = false;` (to hide) or `true` (to show).

4
Test in Acrobat Pro

Execute your script using the JavaScript Debugger (Ctrl+J). Always test your final document in Acrobat Pro first, as Adobe Reader often has stricter security constraints or limited support for certain 3D runtime features.

Use Acrobat 3D JavaScript APIs to Manage Nodes
Adobe Reader Limitations: Keep in mind that end-users utilizing older versions of Acrobat or standard Adobe Reader may need to explicitly trust the document or enable 3D content in their preferences for your JavaScript to execute properly.
Free Microsoft Office alternative

Manage Standard PDFs Easily with WPS Office

While scripting interactive 3D PRC models requires specialized Adobe 3D APIs, WPS Office offers a comprehensive, lightweight, and free alternative for all your everyday PDF editing, converting, and document management needs.

  1. 1. Download and Install: Get the free WPS Office suite from the official website and follow the easy installation steps.
  2. 2. Open Your Document: Launch WPS Office and click 'Open' to load your PDF, Word, Excel, or PowerPoint files instantly.
  3. 3. Edit and Save: Use the familiar interface to edit text, add annotations, or convert your PDF, then save your changes.
Fully compatible with standard PDF files and Microsoft Office formatsSeamlessly edit text, images, and pages within 2D PDF documentsLightweight architecture runs smoothly on older systems like Windows 7All-in-one free suite includes Writer, Spreadsheet, Presentation, and PDF tool
microsoft office alternative - wps office

Frequently Asked Questions

Why is my Acrobat 3D JavaScript not executing in Adobe Reader?

Adobe Reader often disables 3D content parsing and JavaScript execution by default due to security settings. Users must navigate to Preferences > 3D & Multimedia and check 'Enable playing of 3D content' for scripts to trigger.

How do I find the specific name of a PRC subnode to call in JavaScript?

You can find node names by activating the 3D model in Acrobat Pro, opening the 'Model Tree' navigation pane on the left, and expanding the hierarchy. The text label next to each component is the string you must pass to your script's selector function.

Can I test 3D API scripts without re-embedding the 3D model every time?

Yes, you can use the Acrobat JavaScript Debugger (console). Press Ctrl+J to open the console, and you can type and execute commands directly against the active 3D context to immediately test visibility and transformation changes.