Html2canvas is not giving me darker image in angular for a graph image which is rendered on...

Discussão em 'Angular' iniciado por Navjyoti Rath, Outubro 23, 2024.

  1. 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

    Continue reading...

Compartilhe esta Página