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

162
Views
add svg to canvas in nodejs

Is there any way to add svg content to canvas in node

this what I need to add

<svg width="168" height="46" viewBox="0 0 168 46" fill="none" xmlns="http://www.w3.org/2000/svg">
 <text
  fill="#12A59C"
  xml:space="preserve"
  style="white-space: pre"
  font-family="Reenie Beanie"
  font-size="64"
  font-weight="500"
  letter-spacing="0.02em"
 >
  <tspan x="2" y="44">
    Exmaple
  </tspan>
 </text>
</svg>

to below canvas and save as png

const canvas = createCanvas(200, 200);
const ctx = canvas.getContext("2d");


const saveImage = () => {
  fs.writeFileSync("test.png", canvas.toBuffer("image/png"));
};

saveImage();

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!