Programmatically determine DPI via the browser?

Posted by Brandon Pelfrey on Stack Overflow See other posts from Stack Overflow or by Brandon Pelfrey
Published on 2009-06-01T18:01:28Z Indexed on 2010/04/01 6:33 UTC
Read the original article Hit count: 296

Filed under:
|
|
|

Hi all. 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: it's for a visualization research project and it's kind of a control. We currently do it by having the user place a credit card to the screen and match a resizable div (via Mootools) to the real credit card, and voila we can get the DPI and display the page correctly.

Can anyone think of a programmatic way to do this?

© Stack Overflow or respective owner

Related posts about DPI

Related posts about JavaScript