The size of A4 paper is 210mm*297mm, which is 21.0cm*29.7cm, and 1 inch = 2.54cm, if the screen DPI resolution is 72 pixels/inch, convert it: equivalent to 1cm can be rendered (72px/2.54cm) = 28.34px
The following are the pixel sizes of A4 paper on the screen at some common resolutions:
When the resolution is 72 pixels/inch, the pixels of the A4 paper size image are 595×842;
When the resolution is 96 pixels/inch, the pixels of the A4 size image are 794×1123; (default)
When the resolution is 120 pixels/inch, the pixels of the A4 paper size image are 1487×2105;
When the resolution is 150 pixels/inch, the pixels of the A4 paper size image are 1240×1754;
When the resolution is 300 pixels/inch, the pixels of the A4 paper size image are 2480×3508;
Other sizes, generally standard printing 300dpi:
The pixels of the image of the size of A4 paper are 2480×3508;
The pixels of the image of the size of A3 paper are 4960×3508;
The pixels of the image of the size of B3 paper are 3248×4300;
The pixels of the image of the size of B4 paper are 3248×2150.
Note: How to check the DPI of your monitor in win7 environment, see the figure below
In order to facilitate the conversion, I wrote a simple code:
<!doctype html> <html> <head> <title>Centimeters to Pixels</title> <script type="text/javascript"> function convert(){ var dpi = document.getElementById("DPI"); var cm = document.getElementById("txtCM"); var px = (parseFloat(dpi.value)/2.54)*parseFloat(cm.value); px = px.toFixed(3); document.getElementById("txtPX").value=px; } </script> </head> <body> CM: <input type="text" id="txtCM" value="1" /> DPI: <input type="text" id="DPI" value="96" /> PX: <input type="text" id="txtPX" /> <input type="button" value="计算" onclick="return convert();"/> </body> </html>