Skip to content Skip to sidebar Skip to footer

Scale 'mm' To 'pixels' In Css

I have a container with every measurement defined in 'mm' for printing purposes. However, I want to show its preview inside a 600px wide block with perfect fit. What would be the

Solution 1:

The millimiter to pixels and vice-versa formula takes the DPI of the screen into consideration.

DPI meaning dots-per-inch.

There's no truth in mm to pixels unless you have a stable DPI value you can use.

Anyway, this is the formula:

mm = (pixels * 25.4) / dpi

The most-usual seen DPI values seen are 72 and 96 if I'm not mistaken, but since this is for print it will most likely depend on the device settings

Solution 2:

I found this website that converts pixels to mm or vice versa: http://www.unitconversion.org/typography/millimeters-to-pixels-y-conversion.html

According to it, 600px is approximately 159mm.

However there is a problem. Pixel size depends on the resolution of the screen so I'm not really sure how that website came up with its conversion.

Solution 3:

1 millimeter = 3.779527559055 pixel

therefore: 600px/3.7xxxx = 158.75

Post a Comment for "Scale 'mm' To 'pixels' In Css"