I have a animated chart graph which is represented in my UI Screen whenever i am using Html2Canvas it is capturing the image but in very light way. I have to take that image and put it in a PDF.
const element = document.getElementById(divId);
html2canvas(element, { scale: 2, logging: false, useCORS: true, allowTaint: true}).then(canvas => {
const img = canvas.toDataURL('image/jpeg', 1.0);
// now i have to use that img in PDF //
}
I tried adding timeout and converting the image to jpg or png. still not working