Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

306
Views
No se pueden representar imágenes externas en html2canvas

Nuevo en javascript, ayúdame a renderizar imágenes externas en el script html2canvas. ¿Tengo que usar useCORS ? ¿Si sí donde? También he intentado renderizar imágenes de etiquetas css y html, pero no refleja.

También error de la consola: Uncaught (in promise) DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.

 const elm = document.querySelector(".convert"); html2canvas(elm).then(function(canvas) { document.querySelector(".result"); document.body.appendChild(canvas); let cvs = document.querySelector("canvas"); let a = document.querySelector(".a"); a.href= cvs.toDataURL(); a.download="example.png"; });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

También tuve el mismo problema

 html2canvas(this.PrintOrderID.nativeElement, { scale: 2, width: mywindow!.innerHeight, height: mywindow!.innerWidth, useCORS: true, allowTaint : true }).then((canvas) => { mywindow!.document.body.appendChild(canvas); })
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!