Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

168
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!