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

165
Visualizações
Raw HTML to Image Javascript/React

I have a react component that is outputting a raw html string that I want to use to generate an image. This is different from most proposed solutions that I've seen that require either rendering this html to canvas and then capturing the canvas. I can turn that raw html into a document with jsPDF which I was going to use in memory to extract the image. I know this is a less than optimal solution. Basically I want to go from raw html to png ideally.

  exportHtml = () => {
    this.editor.exportHtml((data) => {

      const { design, myHtml } = data;

      var doc = new jsPDF("landscape", "pt", "A4");

      //Rather than outputting a pdf here this is where I'd expect to have an image in memory to save or pass
      doc.html(myHtml, {
        callback: () => {
          //This is where we would send the png'd pdf off to our storage
          doc.save("test.pdf");
        },
      });
    });
  };
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