title: Using jspdf to save html page as pdf, saved pdf contains incomplete page content if browser is zoomed, Why?
body: <p>I am using jspdf and html2canvas combination to save html page as pdf. A pdf copy of current page is saved the moment you click a button. The problem is, if you zoom in the page, and then click the button, the saved pdf contains incomplete portion of the current page. Most of the part not visible on page due to zooming, gets cut off in the saved pdf page. What is the solution?
  Below is the js code being invoked upon click of save button-</p>
  
  <pre><code>var pdf = new jsPDF('l', 'pt', 'a4');
  var source = $('#someId')[0];
  var options = {
     background  : '#eee'
  };
  
  pdf.addHTML(source, options, function(){
  pdf.save('abcd.pdf');
  });
  </code></pre>
  
  <h2>EDIT</h2>
  
  <p>Taking idea from Saurabh's approach, I tried quite a similar thing, but without writing code for any extra div element. Before saving to pdf I made the screen size of a fixed width, and after printing I brought back the width back to default normal. It is working fine for, if it fails, we can always fix the height of the screen too, so that it appears fine in generated pdf despite zooming. Below is the code used by me:-</p>
  
  <pre><code>var pdf = new jsPDF('l', 'pt', 'a4');
  var source = $('#someId')[0];
  var options = {
     background  : '#eee'
  };
  var width = source.clientWidth;
  source.style.width = '1700px';
  pdf.addHTML(source, options,                 
  function(){
  pdf.save('abcd.pdf');
  source.style.width = width+'px';
  });
  </code></pre>