title: Convert HTML Div to PDF via Jquery
body: <p>Im trying to convert my div to PDF.</p>
  
  <p>this is my HTML code:</p>
  
  <p>I can download it just fine but I want to show in the PDF file the Div float:left is aligned with Div Float:right.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script lang="javascript" type="text/javascript"&gt;
  
  
  function run()
   {
      var pdf = new jsPDF('p', 'pt', 'letter'),
      source = $('#content')[0],
      margins = {
          top: 40,
          bottom: 40,
          left: 40,
          right: 40,
          width: 522
      };
  
  pdf.fromHTML(
          source,
          margins.left,
          margins.top,
          {
          'width': margins.width 
          },
          function (dispose) {
              pdf.save('Test.pdf');
          },
          margins
     );
  };
  
  
  &lt;/script type = "text/javascript"&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;title&gt;html2pdf&lt;/title&gt;
  &lt;body&gt;
  
  &lt;div id="content" style = "width: 100px"&gt;
       
              &lt;div id = "name" style="float:right"&gt;
      &lt;div id ="rey"&gt; Rey &lt;/div&gt;
      &lt;div id ="norbert"&gt; norbert &lt;/div&gt;
     &lt;/div&gt;
     &lt;div id = "age" style="float:left; width:50px"&gt;age&lt;/div&gt;
  
  &lt;/div&gt;
  
  &lt;div id = "button" style ="margin-top:50px"&gt;
  &lt;button id="cmd" onclick ="run()"&gt;generate PDF&lt;/button&gt;
  &lt;/div&gt;
  &lt;script src="C:\Users\besmonte\Desktop\for Practice\jspdf.debug.js"&gt;&lt;/script&gt;
  &lt;script src="C:\Users\besmonte\Desktop\for Practice\jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Right now it show the Div left in the first row, and the Div right in the next row. Help Please. </p>