title: Uncaught ReferenceError: jsPDF is not defined with version 2.3.0 and plain JS
body: <p>I need to generate a PDF report from a table and I am using jsPDF along with jsPDF-autotable.
  I know it's very simple to generate a PDF file with jsPDF and I believe that I am following the exact steps mentioned on jsPDF documentation page, but I haven't got any success so far. I have also gone through many similar questions but none seems to be working for me.</p>
  <p>Here is how I have imported jsPDF and jsPDF-autotable in html head tag:</p>
  <pre><code>&lt;!-- Js PDF --&gt;
  &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.3.0/jspdf.umd.min.js&quot;&gt;&lt;/script&gt;
  &lt;!-- Js PDF Auto Table --&gt;
  &lt;script src=&quot;https://cdn.jsdelivr.net/npm/jspdf-autotable@3/dist/jspdf.plugin.autotable.min.js&quot;&gt;&lt;/script&gt;
  </code></pre>
  <p>Here is my html code code for the button which should trigger a JavaScript function:</p>
  <pre><code>&lt;div class=&quot;col text-end&quot;&gt;
          &lt;button type=&quot;button&quot; class=&quot;btn btn-secondary&quot; id=&quot;btnGenerateReport&quot; onclick=&quot;prepareReport()&quot;&gt;
              Generate Report
          &lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Here is the JavaScript function which should just generate a PDF file based on a table:</p>
  <pre><code>function prepareReport() {
      var doc = new jsPDF();
      doc.autoTable({ html: '#reportTable' });
      doc.save(stationSelected + '_' + dateSelected + '.pdf');
  }
  </code></pre>
  <p>And here is the console error I am getting:</p>
  <pre><code>reports.js:180 Uncaught ReferenceError: jsPDF is not defined
  at prepareReport (reports.js:180)
  at HTMLButtonElement.onclick (reports:213)
  </code></pre>
  <p>I would truly appreciate all the help I can get.
  Thanks.</p>