title: jsPDF method to save a file doesn’t work
body: <p>I’ve already spent four days trying to solve a question that, at the beginning, seemed quite a child’s game: using a jsPDF library I’m trying to save a file. Not to print it, that’s something already done.</p>
  
  <p>So here is my HTML:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html manifest="offline.appcache"&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8" /&gt;
  &lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /&gt;
  &lt;title&gt;New project&lt;/title&gt;
  
  &lt;!-- Allow fullscreen mode on iOS devices. (These are Apple specific meta tags.) --&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui" /&gt;
  &lt;meta name="apple-mobile-web-app-capable" content="yes" /&gt;
  &lt;meta name="apple-mobile-web-app-status-bar-style" content="black" /&gt;
  &lt;link rel="apple-touch-icon" sizes="256x256" href="icon-256.png" /&gt;
  &lt;meta name="HandheldFriendly" content="true" /&gt;
  
  &lt;!-- Chrome for Android web app tags --&gt;
  &lt;meta name="mobile-web-app-capable" content="yes" /&gt;
  &lt;link rel="shortcut icon" sizes="256x256" href="icon-256.png" /&gt;
  
  &lt;script src="script/jquery-2.1.0.min.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript" src="script/jspdf.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="script/libs/base64.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="script/libs/sprintf.js"&gt;&lt;/script&gt;
  
   &lt;script type="text/javascript" src="script/jspdf.js"&gt;&lt;/script&gt;
   &lt;script type="text/javascript" src="script/jspdf.plugin.standard_fonts_metrics.js"&gt;&lt;/script&gt; 
   &lt;script type="text/javascript" src="script/jspdf.plugin.split_text_to_size.js"&gt;&lt;/script&gt;               
   &lt;script type="text/javascript" src="script/jspdf.plugin.from_html.js"&gt;&lt;/script&gt;
   &lt;script type="text/javascript" src="script/FileSaver.js"&gt;&lt;/script&gt;
  
   &lt;!-- The CSS --&gt;   
   &lt;style type="text/css"&gt;
      p
      {
      font-size: 18px;
  
      }
      #container{
      width: 800px;
      height: 500px;
      background-color: red;
      }
   &lt;/style&gt;   
  
  &lt;!-- The javascript --&gt;     
  &lt;script&gt;
  function print()
  {
  var doc = new jsPDF();
  doc.text(20, 20, 'Hello world.');
  doc.output('datauri');
  }
  
  function save()
  {
  var doc = new jsPDF();
  doc.text(20, 20, 'Hello world.');
  doc.save('nombre_example.pdf');
  }
  
  &lt;/script&gt;
  &lt;/head&gt; 
  
  &lt;body&gt; 
  
  &lt;input type="button" value="Print" height="50px" width="50px" Onclick="print()"&gt;
  &lt;input type="button" value="Save" height="50px" width="50px" Onclick="save()"&gt;
  &lt;div id="container"&gt;
      &lt;p&gt;
      HOLA &lt;br&gt;
      HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA     &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;HOLA &lt;br&gt;
      &lt;/p&gt;
  &lt;/div&gt;
  
   &lt;/body&gt; 
   &lt;/html&gt;
  </code></pre>
  
  <p>Then, when I click the button 'save' I can read on the javacript console:</p>
  
  <blockquote>
    <p><code>Uncaught TypeError: Object #&lt;Object&gt; has no method 'save' index.html:58</code></p>
  </blockquote>
  
  <p>The list of JavaScript files that I’ve attached to the project is:</p>
  
  <ol>
  <li>FileSaver.js</li>
  <li>jquery-2.1.0.min.js</li>
  <li>jspdf.js  </li>
  <li>jspdf.plugin.addimage.js  </li>
  <li>jspdf.plugin.autoprint.js  </li>
  <li>jspdf.plugin.cell.js  </li>
  <li>jspdf.plugin.from_html.js  </li>
  <li>jspdf.plugin.javascript.js  </li>
  <li>jspdf.plugin.png_support.js  </li>
  <li>jspdf.plugin.sillysvgrenderer.js  </li>
  <li>jspdf.plugin.split_text_to_size.js  </li>
  <li>jspdf.plugin.standard_fonts_metrics.js  </li>
  <li>jspdf.plugin.total_pages.js  </li>
  </ol>
  
  <p>and the libraries:</p>
  
  <ol>
  <li>base64.js  </li>
  <li>sprintf.js</li>
  </ol>
  
  <p>So, after showing all this info my question is: Why can’t I make the save button work properly?</p>
  
  <p>Any ideas?  </p>