title: Converting Canvas to Pdf using JsPDF
body: <p>I am trying to convert canvas into pdf but i get clean white pdf in result
  Here is the code, I am not being able to figure out what i am missing..</p>
  
  <pre><code>function HtmlToImage(){
      html2canvas(document.body, {
      onrendered: function(canvas) {
      var img =canvas.toDataURL("image/jpeg,1.0");  
      var pdf = new jsPDF();
      pdf.addImage(img, 'JPEG', 0, 0);
      pdf.output('datauri');
                  }
            });
         }
  </code></pre>