N
N
n1ksON2020-12-01 10:42:14
React
n1ksON, 2020-12-01 10:42:14

How to convert html to PNG?

There is a component in the ReactJS project. It must be exported in PNG format. I found repng , but it has no documentation at all, I can’t figure it out.

There are ready-made converters that you can connect to via the API, but they must receive an html file as input. And I have only html-string. Then is it possible to somehow convert the having code to base64?

Tell me, what is the easiest way to convert a React component or HTML code to PNG?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alexalexes, 2020-12-01
@n1ksON

There is such a library. HTML drives into the canvas, and you can already pull out any graphic binary from it.
https://html2canvas.hertzen.com

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question