After reading many answers on the Internet, they all said to generate pdf first and then convert it into pictures, but I tried it. Generating pdf from html will mess up the page style, and then use imagick to convert pdf into pictures. I have always installed this extension. Unsuccessful, there is nothing in phpinfo(), so I would like to ask if there is a one-step method to directly convert the html page into an image?
html2canvas.js
It should be regarded as a screenshot. phantomjs can simulate the browser kernel. Of course, taking screenshots is not a problem. You can search for usage
It seems that there is a program called dom-to-image.js, which converts dom nodes into base64 strings. You can check it
You can use imagegrabwindow to take screenshots
rasterizeHTML.js This one is much better than that html2canvas.js, go check it out