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:
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.