title: JsPDF in Angular 5 addImage() method
body: <p>i am using jspdf library for converting my html into pdf </p>
  
  <p>html : </p>
  
  <pre><code> &lt;div *ngFor="let person of people"
               {{person.name}}
              &lt;button (click) = "generatePdf()"&gt;&lt;/button&gt;
           &lt;/div&gt;
  
           &lt;div id="contentForPdf" style="display:none"&gt;
              &lt;div *ngFor="let person of people"&gt;
                  {{person.address}}
              &lt;/div&gt;
       &lt;/div&gt;
  </code></pre>
  
  <p>in component :    </p>
  
  <pre><code>public generatePdf():void{
                const data = document.getElementById('contentForPDF');
                   html2canvas(data).then(canvas =&gt; {
                     const imgWidth = 300;
                     const pageHeight = 295;
                     const imgHeight = (canvas.height * imgWidth) / canvas.width;
                     const heightLeft = imgHeight;
                     const contentDataURL = canvas.toDataURL('image/png');
                     const pdf = new jsPDF('p', 'mm', 'a4');
                     const position = 0;
                     pdf.addImage(contentDataURL, 'PNG', 0, position, imgWidth,imgHeight);
                     pdf.save(name);
                     }
  </code></pre>
  
  <p>and because of display is none addImage method is giving me error as :</p>
  
  <ol>
  <li>Error: Uncaught (in promise): Error: addImage does not support files
  of type 'UNKNOWN', please ensure that a plugin for 'UNKNOWN' support
  is added. Error: addImage does not support files of type 'UNKNOWN',
  please ensure that a plugin for 'UNKNOWN' support is added.</li>
  </ol>