Convert HTML to JPG

I must say — we are not talking about the screenshots of the sites, although probably the solution will be fine for this.

You need to generate quite a large number of images from small pieces of html.

What ideas came to mind:
1) to Put on the server a thread and webkit to generate with it
2) Put mPDF or TCPDF to convert html to pdf, then with the help of ImageMagick konvertnut in jpg

In the first case — don't like the need to install additional software, it's rather platform specific solution.
The second is likely to suffer performance.

Who can faced and there is some easy solution? Ideally would be some sort of analog mPDF, only in JPG
October 3rd 19 at 04:14
4 answers
October 3rd 19 at 04:16
Support. This functionality is there escalope in the example of "three lines". - brain commented on October 3rd 19 at 04:19
Yes, thanks — it turned out to be the best, binary from money vdst, the sample code is in the documentation - mariano.Greenfelder commented on October 3rd 19 at 04:22
October 3rd 19 at 04:18
From ready-made solutions still have wkhtmltoimage — crossplatforming. Used on a few projects — pretty handy utility. I recommend only process through which.
October 3rd 19 at 04:20
Can offer the use of Qt Webkit: submit your code in QString, then get the picture in Qpixmaps and save it, it seems quite simple.
October 3rd 19 at 04:22
The second option is still bad because the result of rendering the html will not match the browser version. Html support is very limited there.

ps: IMHO if you want maximum quality, the webkit best option.

Find more questions by tags HTMLPHPimage processing