title: How to save PDF file from jsPDF on a server in Javascript?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var doc = new jsPDF();
  $('#generatereport').click(function() {
     doc.fromHTML($('#lppresults')[0], 15, 15, {
     width: 170
     }, function() {
     doc.save('sample-file.pdf');
     });
  });
   </code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
          
  &lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.4/jspdf.min.js"&gt;&lt;/script&gt;
  &lt;div class="survey-results" id="lppresults"&gt;
      &lt;button id="generatereport"&gt;Download Report&lt;/button&gt;
      &lt;h1 style="border: solid;"&gt;TEST CONTENT&lt;/h1&gt;&lt;br /&gt;
      &lt;h1 style="border: solid;"&gt;TEST CONTENT1&lt;/h1&gt;
  &lt;/div&gt;
          
            </code></pre>
  </div>
  </div>
  </p>
  
  <p>I want to save file on the server with JavaScript, but currently I can save this file only on the user's computer.</p>