title: how to convert a web page into pdf by button click in html5
body: <p>I have web page with containing data I want that when I click generate pdf button it should create pdf of that page.
  And Save Locally .</p>
  
  <p>I have searched alot but I am getting script to only create pdf by entering data is there any other way </p>
  
  <p>Below is the method which I tried but it is not suitable I want to create whole page into pdf file.</p>
  
  <p>jspdf.com</p>
  
  <p>I also tried another code but it also does not create the file</p>
  
  <p></p>
  
  <pre><code>  &lt;script&gt;
  
  
    function generatePDF(){} 
  
    var conv = new ActiveXObject("pdfServMachine.converter");
    conv.convert("http://www.google.com", "c:\\google.pdf", false);
    WScript.Echo("finished conversion");
   }
  
   &lt;/script&gt;
   &lt;body onload="generatePDF()"&gt;
   &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>