title: CORS error for adding image from another domain in jsPDF in Angular 8
body: <p>I want to use some images in jsPdf. These images come from another domain (API). This is my code:</p>
  
  <pre><code>let img = new Image();
  img.src = 'myUrl';
  docPdf.addImage(img, 'JPEG', col, row, width, height, 'FAST');
  </code></pre>
  
  <p>But I receive this error:</p>
  
  <pre><code>Access to image at 'http://127.0.0.1:8000/some-url' from origin 'http://127.0.0.1:4000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  
  ERROR Error: Supplied Data is not a valid base64-String jsPDF.convertStringToImageData 
  at Object.x.convertStringToImageData (jspdf.min.js:50)
  </code></pre>
  
  <p>Then I add crossOrigin to my url but I also receive that error.</p>
  
  <pre><code>img.crossOrigin = 'anonymous';
  </code></pre>
  
  <p>or 
      img.crossOrigin = 'Anonymous';</p>
  
  <p>I also set cors settings in backend:</p>
  
  <pre><code>CORS_ORIGIN_ALLOW_ALL = True
  </code></pre>