title: jsPdf: set margin using html() plugin
body: <p>I am using the jsPDF to convert HTML into PDF file. It works fine but I want to add margin around the page so that text should not get cut when content splits into pages. But I didn't find any way to add margin to the PDF file. I am using following code to add the text. Note that I am using the new <code>.html()</code> plugin, not <code>.addHtml()</code>, which is <a href="https://rawgit.com/MrRio/jsPDF/master/docs/global.html#addHTML" rel="noreferrer">deprecated</a>, as indicated by their documentation. So this is NOT a duplicate of <a href="https://stackoverflow.com/questions/46012181/jspdf-add-margins-to-pdf-page">this question</a>.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
   &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;script src="jsPDF-master/dist/jspdf.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://html2canvas.hertzen.com/dist/html2canvas.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="content"&gt;
         &lt;label&gt;&lt;span&gt;Standard&lt;/span&gt;&lt;/label&gt;
         &lt;label&gt;&lt;span&gt;Planning item number:&lt;/span&gt;&lt;/label&gt;
      &lt;/div&gt;                    
      &lt;button onclick="exportPDF()" style="float:right;"&gt;Download&lt;/button&gt;
      &lt;script&gt;
          function exportPDF () {
              var pdf = new jsPDF('p', 'pt', 'a4');
              var margins = {
                  top: 40, bottom: 60, left: 40, right: 200
              };
              pdf.html(document.getElementById("content"), {
                  callback : function (pdf) {
                      pdf.save("a4.pdf");
                  }
              });
          }
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How to add margin to the PDF pages?</p>