Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda