Reputation: 610
I have for example 20 element Ids and I want to make screenshot of them (like a detail). For that screenshot I would like to have specific dimensions (for example 400x400). My current viewer has different dimensions. Is there some way how to achieve it and return current viewer in original view?
I was trying to do these steps:
fitToView
but passed elements are sometimes out of the view.struggling with it so any help would be great
Upvotes: 0
Views: 437
Reputation: 9942
There's a nice blog post providing more details around the dimensions of screenshots taken from Forge Viewer: https://forge.autodesk.com/blog/more-screenshots.
If that does not help with your use cases, you could also consider having an additional instance of the viewer on your page, sized exactly as the screenshots you'd like to generate, and only load the IDs of elements you need. Here's a simple code that demonstrates the idea: https://github.com/petrbroz/forge-basic-app/commit/f95cb67944830b842955c9599f2e1e4683ff13f0.
Upvotes: 1