Programmatically determine DPI via the browser?

后端 未结 4 776
情话喂你
情话喂你 2021-02-12 16:24

I would like to programmaticaly determine the DPI of a user\'s display in order to show a web page at a precise number of units (centimeters/inches). I know it a weird request:

4条回答
  •  既然无缘
    2021-02-12 16:32

    I think that you won't get precise results - for example you can resize the picture using the monitor. I'd rather stick with the user-driven method, although you can f.e. detect screen resolution for a first estimate.

提交回复
热议问题