title: jsPDF addSvgAsImage, canvg is not defined
body: <p>I'm using <a href="https://github.com/MrRio/jsPDF" rel="nofollow noreferrer">jsPDF</a> in my Typescript React project and I want to as an SVG to my PDF using jsPDF. </p>
  
  <p>I use <a href="http://raw.githack.com/MrRio/jsPDF/master/docs/module-svg.html#~addSvgAsImage" rel="nofollow noreferrer"><code>addSvgAsImage</code></a> like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>let svg = this.ref.innerHTML
  if (svg)
    svg = svg.replace(/\r?\n|\r/g, '').trim()
  
  pdf.addSvgAsImage(svg, 15, 45, 270, 130, 'SLOW')
  </code></pre>
  
  <p>and in my browser I got this error:</p>
  
  <pre class="lang-none prettyprint-override"><code>Uncaught (in promise) ReferenceError: canvg is not defined
      at Object.et.addSvgAsImage (jspdf.min.js?e511:180)
      ...
  </code></pre>
  
  <p>It seems that I should include <code>canvg</code> globally (<a href="https://github.com/MrRio/jsPDF/issues/2205" rel="nofollow noreferrer">https://github.com/MrRio/jsPDF/issues/2205</a>), but I have no clue how I can do that. </p>
  
  <p>Does anyone tried <code>addSvgAsImage</code> in a React project or has an idea how I could solve this problem?</p>