title: I cannot use jsPDF with Angular 10
body: <p>I was trying to print my page using <code>jspdf</code> library. I've tried so many solutions to get it done following examples on here and almost every Google suggestion links but I still couldn't fix it.</p>
  <p>Here is what I've tried so far:</p>
  <pre><code>import * as jsPDF from 'jspdf';
  .....
  openPDF(): void {
      const DATA = this.couponPage.nativeElement;
      const doc = new jsPDF('p', 'pt', 'a4');
      doc.fromHTML(DATA.innerHTML, 15, 15);
      doc.output('dataurlnewwindow');
  }
  </code></pre>
  <p>Trying to import <code>jsPDF</code> like the above creates the following error while compiling</p>
  <blockquote>
  <p>ERROR in src/...component.ts:42:21 - error
  TS2351: This expression is not constructable.
  Type 'typeof import(&quot;jspdf&quot;)' has no construct signatures.</p>
  <pre><code>42     const doc = new jsPDF('p', 'pt', 'a4');
  </code></pre>
  </blockquote>
  <p>So, I've tried to import it in another way as suggested in this <a href="https://stackoverflow.com/a/53972965/6810539">stackoverflow answer</a></p>
  <pre><code>declare var jsPDF: any;
  </code></pre>
  <p>And yet this creates a console error saying that <code>jsPDF</code> is not defined.</p>
  <p>Then I found another solution as posted in here <a href="https://www.positronx.io/angular-pdf-tutorial-export-pdf-in-angular-with-jspdf/" rel="noreferrer">Angular 10/9/8 PDF Tutorial – Export PDF in Angular with JSPDF</a></p>
  <p>And following this method now I got the following error</p>
  <blockquote>
  <p>ERROR TypeError: doc.fromHTML is not a function
  openPDF notice.component.ts:43
  ...Component_Template_button_click_2_listener ...component.html:3
  Angular 23</p>
  </blockquote>
  <p>I've no Idea what I've missed here as this library supposed to work in all Angular versions. Any help will be appreciated.</p>
  <p>Here I've created a <a href="https://angular-ivy-vtuj3b.stackblitz.io" rel="noreferrer">Stackblitz project</a></p>