Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

230
Visualizações
How to use html2canvas and then share the image generated on whatsapp?

I am trying to use html2canvas to generate a snapshot of an html card(which by the way is working properly and the image also gets downloaded properly when I test it on PC) but I need to pass this image to the shareViaWhatsapp function. Not sure which variable stores the generated image so I can pass it directly as the third parameter in this.socialSharing.shareViaWhatsApp("Come join ABCD with me","Subject", imageURL) instead of imageURL .

When I run the apk on phone, I get "URL_NOT_SUPPORTED" error. Please help.

html2canvas(this.screen.nativeElement, {
      imageTimeout: 15000, //newline
      scale:3, //newline
      useCORS: true
      }).then(canvas => {
        imageURL = canvas.toDataURL("image/jpg");
        let a = document.createElement("a");
        a.href = imageURL;
        a.download = "letter.jpg";
        a.click();  
        this.socialSharing.shareViaWhatsApp("Come join ABCD Community with me","Subject", imageURL)
        .then((entries) => {
          console.log('success ' + JSON.stringify(entries));
        })
        .catch((error) => {
          alert('error 1' + JSON.stringify(error));
        });
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda