Programmatically determine DPI via the browser?

后端 未结 4 775
情话喂你
情话喂你 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:45

    It's not possible from a browser without code running on the target computer. If you could install something on the target computer you might be able to determine enough about the monitor to calculate this.

提交回复
热议问题