sushilprj
sushilprj

Reputation: 2243

Persist capture screenshots of model views

I need to capture model view screenshots and use them later. When I capture the screenshot, save and render without refreshing page. it works but when I refresh the page, it renders with broken screenshot image.

What I am doing -

  1. Capture screenshot using viewer.getScreenShot
  2. Persist the blob url to db
  3. render broken image after refreshing the page or using it later.

Upvotes: 0

Views: 157

Answers (1)

Felipe
Felipe

Reputation: 4375

Not sure what tech you are using on your backend, but simply download the image from the url and store it in your DB ...

Alternatively you could automate the whole process of generating screenshots, take a look at those articles:

Running Forge Viewer headless in Chrome with Puppeteer

Screenshot automation of 2D Drawings with Forge Viewer and Headless Chrome

Upvotes: 1

Related Questions