Skip to content
Discussion options

You must be logged in to vote

I'm at a point where I have the exact same issue, even with changing the static viewer minimumRenderScale. I am setting the viewer element to e.g. 2048x2048px, the HTML DOM Element also shows that it's 2048x2048, yet when trying to generate a screenshot with .toDataURL or .toBlob, they're atleast 1.5x the size and never the same as the DOM Element. (also not even the same ratio)
With the newest version 3.1.1 though.

Well, it seems the 2023 solution is this:
Put "window.devicePixelRatio = 1;" somewhere in your JavaScript. Checking the original DPR it was in fact 1.5, that's when my brain registered that this was connected with my screenshots being ~1.5x bigger.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by elalish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1666 on January 21, 2021 20:03.