1

We are using Viewer Autodesk via Forge to view dwf and pdf. As per your guidance: https://aps.autodesk.com/blog/dwf-and-pdf-support-forge-viewer.

  • What is the command or extension to view more than one sheet in dwf and/or pdf? (I have a dwf or pdf file and I want to see all the pages (sheets) contained in this file.)

  • Can we apply the white background in the sheet from dwf file?

1 Answers1

2

You can use Autodesk.DocumentBrowser extension which list all viewables of your document. You can access them by the hierarchy or by thumbnails. DocumentBrowserTree documentBrowserThumbnails

If you want to access different viewables by code you can get them with:

var viewables = viewerDocument.getRoot().search({'type':'geometry'});

instead of doing var defaultModel = viewerDocument.getRoot().getDefaultGeometry();.

This will give you the list all of the views or sheets you can display in the viewer.

Then if you want to filter only 3D or 2D, you can add a role filter in the search query: var twoDviewables = viewerDocument.getRoot().search({'type':'geometry', role: '2D'})

AlexAR
  • 1,052
  • 1
  • 9
  • 15
  • I applied the proposed solution, however when the dwf has 3 more sheets, it gives an error to paginate the fourth sheet. According to code: https://autode.sk/41GPpNT – Alexandre Vieira Apr 18 '23 at 12:54
  • You should open a new question or request related to this specific error as this extension is built-in the APS Viewer. – AlexAR Apr 18 '23 at 13:38