title: Blank spaces appearing while printing pdf from phantomjs
body: <p>Presently I am working on a project in which i have to generate a pdf from a webpage which contains some special symbols as well. so for generating it i am using Phantomjs(version 1.9.8). for this i have applied the following algorithm on my web page.</p>
  
  <pre><code>var heightTracker = 0;
  var max_A4_page_height=842pt; // as size of A4 page is about 842 points
  for every_division on page
  var temp_height=Read_height_of_division(); // This give's height in pixels
  temp_height*=(72/96); // Converting pixels to points
  heightTracker+=temp_height;
  if( heightTracker&gt;= max_A4_page_height)
  {
      Insert_Page_Break_Before_This_Division();
      heightTracker=temp_height; // Initial height of new page
  }
  </code></pre>
  
  <p>The problem which i am facing is in many cases this is showing blank pages and if i reduce the A4 page height then my division element is broken into two pages and i got some blank space after that.</p>
  
  <p>I have done some experiments on the above problem and get to know that the height of a division on my web page is different from height of a division on PDF i.e. in many cases the height is compressed by some factor.</p>
  
  <p>Is anyone having idea why it is happening and how can i get out from this problem.</p>
  
  <p>The current pdf is with 72 DPI. I also tried 120 DPI but no suitabe changes I found. In my pdf I also printed the height of each division and cumulative height of page. And <a href="https://drive.google.com/open?id=0B17rEpr8xw5tdjJ0VzFXZXV2RlU" rel="nofollow">here is the pdf</a>.</p>