title: jsPdf outputs undefined
body: <p>I'm using jsPdf to save my  webpage as pdf</p>
  
  <p>I'm using meteor framework, Here is my code</p>
  
  <pre><code>'click .button':function(e)
      {
         var doc = new jsPDF();
           var source = $('#stackoverflow').first();
           var specialElementHandlers = {
  
           };
  
           doc.fromHTML(
               source, // HTML string or DOM elem ref.
               0.5,    // x coord
               0.5,    // y coord
               {
                   'width': 7.5, // max width of content on PDF
                   'elementHandlers': specialElementHandlers
               });
  
           doc.output('dataurlnewwindow');  
           doc.save('test.pdf');
      },
  </code></pre>
  
  <p>My stackoverflow div</p>
  
  <pre><code>&lt;div class="tab-pane" id="stackoverflow"&gt;
          &lt;a href="" class="button"&gt;Run Code&lt;/a&gt;
            &lt;form class="navbar-form navbar-left" role="search"&gt;
              &lt;div class="form-group"&gt;
                  &lt;input type="text"  id="stackurl" class="form-control" autocomplete="off" placeholder="Enter Your Stackoverflow ID"&gt;
              &lt;/div&gt;
              &lt;button type="submit" class="btn btn-default" id="getData"&gt;Get Data&lt;/button&gt;
            &lt;/form&gt;
            &lt;br&gt;&lt;br&gt;
             &lt;hr&gt;
            {{&gt; BasicDetails}}
             &lt;hr&gt;
            {{&gt; UserQuestions}}
              &lt;hr&gt;
            {{&gt; UserAnswers}}   
        &lt;/div&gt;
  </code></pre>
  
  <p>For the doc.save('test.pdf'), the error is</p>
  
  <p><code>saveas is not defined</code> </p>
  
  <p>I have added <code>filesaver.js</code> to my project which loads on the dom loads, still getting the error, <strong>Do I need to add any other packages <code>blob.js</code> or <code>downloadify.js</code></strong></p>
  
  <p>For doc.output('dataurl')</p>
  
  <p>In the output window I'm getting only '<code>undefined</code></p>
  
  <p>I've downloaded zip file from github and added following files to my project</p>
  
  <p><code>jspdf.js,
  jspdf.plugin.from_html.js,
  jspdf.plugin.split_text_to_size.js,
  jspdf.plugin.standard_font_metrics.js</code></p>
  
  <p>whatis wrong with my code?</p>
  
  <p><strong>UPDATE</strong>: With slavo solution I'm not getting the <code>saveAs</code>  error but still my data is not showing in pdf ,It is showing <code>undefined</code> in pdf file. My div contains charts, Is that the problem?</p>
  
  <p><strong>Looks like jsPDF have problems with the chrts</strong></p>