title: How to properly use jsPDF library
body: <p>I want to convert some of my divs into PDF and I've tried jsPDF library but with no success. It seems I can't understand what I need to import to make the library work. I've been through the examples and I still can't figure it out. I've tried the following:</p>
  
  <pre><code>&lt;script type="text/javascript" src="js/jspdf.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>After jQuery and:</p>
  
  <pre><code>$("#html2pdf").on('click', function(){
      var doc = new jsPDF();
      doc.fromHTML($('body').get(0), 15, 15, {
          'width': 170
      });
      console.log(doc);
  });
  </code></pre>
  
  <p>for testing purposes but I receive:</p>
  
  <pre><code>"Cannot read property '#smdadminbar' of undefined"
  </code></pre>
  
  <p>where <code>#smdadminbar</code> is the first div from the body.</p>