title: how to create margin in canvas using jsPDF
body: <p>Hi I'm generating pdf from html by using jdPDF, but unfortunately I'm not able to give page margin. Any help would be appreciated. How I can add margin into my page by using canvas object.</p>
  
  <p>Here is source code.</p>
  
  <pre><code>    $(function(){
      //$("#button1").click(function(){
          console.log("hey");
  
          $( "#other" ).click(function() {
              //alert("hello");
  
          var pdf = new jsPDF('p', 'pt', 'letter');
          source = $('#fromHTMLtestdiv');
  
          var canvas = pdf.canvas;
          canvas.height = 72 * 11;
          canvas.width=72 * 8.5;;
  
         // var width = 400;
  
          document.body.style.width = 400 + 'px';
          document.body.style.margin = 30 + 'px';
  
          //source.css("border","1px solid");
  
          html2pdf(source, pdf, function(pdf) {                
                  //var iframe = document.createElement('iframe');
                 // iframe.setAttribute('style','position:absolute;right:0; top:0; bottom:0; height:100%; width:500px');
                //  document.body.appendChild(iframe);
                //  iframe.src = pdf.output('datauristring');
  
                window.location = pdf.output('datauristring');
  
                 //var div = document.createElement('pre');
                 //div.innerText=pdf.output();
                 //document.body.appendChild(div);
              }
          );
      //});
  
      })
      });
  </code></pre>
  
  <p>May I getting right approach? here is the link of image with problem</p>
  
  <p><a href="http://screencast.com/t/50UMjHImD" rel="nofollow">http://screencast.com/t/50UMjHImD</a></p>