title: PDF file download with script functions
body: <p>I have js script to download excel file </p>
  
  <p>here my code.. Some error in my Excel file download function ignore that..</p>
  
  <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>&lt;script&gt;
    $('#donwload').on('click', function() {
    // get the table id
    $("#tab").table2excel();
  });
  &lt;/script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table style="width:100%" id="tab"&gt;
    &lt;tr&gt;
      &lt;th&gt;Firstname&lt;/th&gt;
      &lt;th&gt;Lastname&lt;/th&gt; 
      &lt;th&gt;Age&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Jill&lt;/td&gt;
      &lt;td&gt;Smith&lt;/td&gt;
      &lt;td&gt;50&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Eve&lt;/td&gt;
      &lt;td&gt;Jackson&lt;/td&gt;
      &lt;td&gt;94&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;John&lt;/td&gt;
      &lt;td&gt;Doe&lt;/td&gt;
      &lt;td&gt;80&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;button id="donwload" class="downloadbutton1"&gt;Download&lt;/button&gt;
  
  &lt;link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"&gt;
  &lt;script src="https://code.jquery.com/jquery-1.12.4.js"&gt;&lt;/script&gt;
  
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://public.azurewebsites.net/js/jquery.table2excel.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"&gt;
  &lt;script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Like that i want PDF file download with out any PHP code write for PDF Download.
  when ever user clicks the button to download the PDF file.</p>