title: Simulate A4 page in HTML
body: <p>I need to create an HTML page with A4 paper size. </p>
  
  <p>I know that A4 paper size in pixels is: <code>595px x 842px</code> (<em>string No. 10-11</em>). But while I put those sizes and try to print the page (I print to PDF file, due to the temporary lack of inks), I do not get my HTML fully fits the page: it is much smaller. </p>
  
  <p>When I tried to add some pixels (with the coefficient, of course), I got <code>794px x 1122px</code> (<em>string No. 12-13</em>) and the second printing attempt (saving to PDF file) gave me the result that this variant is a bit bigger, then needed.</p>
  
  <p>So, what is the solution and why may <code>595px x 842px</code> not be compatible with real A4 saved to PDF? </p>
  
  <p><a href="http://jsfiddle.net/DTj4v/" rel="noreferrer">This is the example</a></p>
  
  <p>P.S. I use Chromium for Ubuntu 13.10 and did not checked it on Windows. </p>
  
  <p>I am doing this to be able to simply change the values via PHP and then convert HTML page to PDF, like <a href="https://stackoverflow.com/a/1204757/2486472">described here</a>.</p>